List of all members.
Public Member Functions |
| Model ($conf=NULL) |
| get ($key) |
| getKeys () |
| set ($key, $value=NULL, $is_js_attribute=false) |
| remove ($key) |
| version () |
| error ($msg) |
| errorCount () |
| errors ($prefix="\nWARNING: ", $separator="\n\t") |
| errorReset () |
| toJS ($js_object_name) |
Protected Attributes |
| $version_msg = "2.0rc" |
| $attributes = array() |
| $js_attributes = array() |
| $error_msgs = array() |
| $confpath = "" |
Detailed Description
Model is the base widget class for Model Objects. It provides default error message behavior, some introspection and finally set and get methods for setting Object attributes.
Definition at line 20 of file Model.php.
Member Function Documentation
errorReset - reset the errors and error count stored with this object.
- Returns:
- true always
Definition at line 179 of file Model.php.
Model::errors |
( |
$ |
prefix = "\nWARNING: " , |
|
|
$ |
separator = "\n\t" |
|
) |
| |
errors - return a string with all the errors stored in this object prefixed by $prefix
- Parameters:
-
$prefix | - message prefix to display |
- Returns:
- the error formatted error string
Definition at line 170 of file Model.php.
get - Get the value of an attribute in he widget
- Parameters:
-
$key | - the name of the attribute you wish to get. |
- Returns:
- return the attribute by key or false if not found.
Definition at line 85 of file Model.php.
getKeys - get the attribute keys for configuration
- Returns:
- a list of keys as an array
Definition at line 96 of file Model.php.
Model::Model |
( |
$ |
conf = NULL ) |
|
remove - Remove an attribute from Object
- Parameters:
-
$key | - the key of the attribute you wish to remove |
- Returns:
- true if successful, false otherwise.
Definition at line 132 of file Model.php.
Model::set |
( |
$ |
key, |
|
|
$ |
value = NULL , |
|
|
$ |
is_js_attribute = false |
|
) |
| |
set - Set an attribute
- Parameters:
-
$key | - the attribute you wish to set |
$value | - the value you wish to save, if NULL then unset value |
$is_js_attribute | - if true then allow to pass via toJS to JavaScript |
- Returns:
- true if stored false otherwise.
Definition at line 107 of file Model.php.
Model::toJS |
( |
$ |
js_object_name ) |
|
toJS - generates the text of a Javascript object from the instance's attributes
- Parameters:
-
$js_object_name | - The name of the JavaScript object you are creating |
- Returns:
- text suitable to eval via the JavaScript interpreter
Definition at line 191 of file Model.php.
version - return a string of the version of this object
- Returns:
- string with version message
Definition at line 140 of file Model.php.
The documentation for this class was generated from the following file: