XOOPS 2.5.6
Final
|
Public Member Functions | |
_loadFilters () | |
assignVar ($key, $value) | |
assignVars ($var_arr) | |
cleanVars () | |
destoryVars ($var) | |
getErrors () | |
getHtmlErrors () | |
getValues ($keys=null, $format= 's', $maxDepth=1) | |
getVar ($key, $format= 's') | |
& | getVars () |
initVar ($key, $data_type, $value=null, $required=false, $maxlength=null, $options= '', $enumerations= '') | |
isDirty () | |
isNew () | |
loadFilters ($method) | |
registerFilter ($filtername) | |
setDirty () | |
setErrors ($err_str) | |
setFormVars ($var_arr=null, $pref= 'xo_', $not_gpc=false) | |
setNew () | |
setVar ($key, $value, $not_gpc=false) | |
setVars ($var_arr, $not_gpc=false) | |
toArray () | |
unsetDirty () | |
unsetNew () | |
& | xoopsClone () |
XoopsObject () | |
Public Attributes | |
$_errors = array() | |
$_filters = array() | |
$_isDirty = false | |
$_isNew = false | |
$cleanVars = array() | |
$vars = array() | |
Base class for all objects in the Xoops kernel (and beyond)
Definition at line 58 of file object.php.
XoopsObject::_loadFilters | ( | ) |
load all additional filters that have been registered to the object
private
Definition at line 839 of file object.php.
XoopsObject::assignVar | ( | $key, | |
$value | |||
) |
assign a value to a variable
public
string | $key | name of the variable to assign |
mixed | $value | value to assign |
Definition at line 185 of file object.php.
References _DBDATESTRING, _DBTIMESTAMPSTRING, _DBTIMESTRING, and xoops_convert_decode().
XoopsObject::assignVars | ( | $var_arr | ) |
assign values to multiple variables in a batch
private
array | $var_array | associative array of values to assign |
Definition at line 237 of file object.php.
XoopsObject::cleanVars | ( | ) |
clean values of all variables of the object for storage. also add slashes whereever needed
YOU SHOULD NOT USE ANY OF THE UNICODE TYPES, THEY WILL BE REMOVED
Definition at line 645 of file object.php.
References _DBDATESTRING, _DBTIMESTAMPSTRING, _DBTIMESTRING, _XOBJ_ERR_REQUIRED, _XOBJ_ERR_SHORTERTHAN, MyTextSanitizer\getInstance(), and xoops_convert_encode().
XoopsObject::destoryVars | ( | $var | ) |
unset variable(s) for the object
public
mixed | $var |
Definition at line 282 of file object.php.
References $var.
XoopsObject::getErrors | ( | ) |
return the errors for this object as an array
Definition at line 936 of file object.php.
XoopsObject::getHtmlErrors | ( | ) |
return the errors for this object as html
Definition at line 947 of file object.php.
XoopsObject::getValues | ( | $keys = null , |
|
$format = 's' , |
|||
$maxDepth = 1 |
|||
) |
Returns the values of the specified variables
mixed | $keys | An array containing the names of the keys to retrieve, or null to get all of them |
string | $format | Format to use (see getVar) |
int | $maxDepth | Maximum level of recursion to use if some vars are objects themselves |
Definition at line 337 of file object.php.
References $vars.
XoopsObject::getVar | ( | $key, | |
$format = 's' |
|||
) |
returns a specific variable for the object in a proper format
YOU SHOULD NOT USE ANY OF THE UNICODE TYPES, THEY WILL BE REMOVED
public
string | $key | key of the object's variable to be returned |
string | $format | format to use for the output |
Definition at line 367 of file object.php.
References $html, $i, $image, $op, $options, $ret, _DBDATESTRING, _DBTIMESTAMPSTRING, _DBTIMESTRING, and MyTextSanitizer\getInstance().
Referenced by PmMessageHandler\sendEmail().
& XoopsObject::getVars | ( | ) |
returns all variables for the object
public
Definition at line 324 of file object.php.
References $vars.
XoopsObject::initVar | ( | $key, | |
$data_type, | |||
$value = null , |
|||
$required = false , |
|||
$maxlength = null , |
|||
$options = '' , |
|||
$enumerations = '' |
|||
) |
initialize variables for the object
YOU SHOULD NOT USE THE $enumeration PARAMETER
public
string | $key | |
int | $data_type | set to one of XOBJ_DTYPE_XXX constants (set to XOBJ_DTYPE_OTHER if no data type ckecking nor text sanitizing is required) |
mixed | $ | |
bool | $required | require html form input? |
int | $maxlength | for XOBJ_DTYPE_TXTBOX type only |
string | $option | does this data have any select options? |
string | $enumeration | array for XOBJ_DTYPE_ENUM type only |
Definition at line 173 of file object.php.
References $options.
Referenced by PmMessage\__construct(), XoopsCacheModelObject\__construct(), XoopsMembership\XoopsMembership(), and XoopsRank\XoopsRank().
XoopsObject::isDirty | ( | ) |
Definition at line 154 of file object.php.
XoopsObject::isNew | ( | ) |
Definition at line 133 of file object.php.
XoopsObject::loadFilters | ( | $method | ) |
load all local filters for the object
Filter distribution: In each module folder there is a folder "filter" containing filter files with, filename: [name_of_target_class][.][function/action_name][.php]; function name: [dirname][_][name_of_target_class][_][function/action_name]; parameter: the target object
string | $method | function or action name public |
Definition at line 870 of file object.php.
References $dirname, $file, $method, $module_handler, XoopsCache\read(), XoopsCache\write(), xoops_gethandler(), and xoops_load().
XoopsObject::registerFilter | ( | $filtername | ) |
dynamically register additional filter for the object
string | $filtername | name of the filter public |
Definition at line 829 of file object.php.
XoopsObject::setDirty | ( | ) |
*#@+ mark modified objects as dirty
used for modified objects only
public
Definition at line 146 of file object.php.
XoopsObject::setErrors | ( | $err_str | ) |
XoopsObject::setFormVars | ( | $var_arr = null , |
|
$pref = 'xo_' , |
|||
$not_gpc = false |
|||
) |
Assign values to multiple variables in a batch
Meant for a CGI contenxt:
private
array | $var_arr | associative array of values to assign |
string | $pref | prefix (only keys starting with the prefix will be set) |
Definition at line 308 of file object.php.
XoopsObject::setNew | ( | ) |
XoopsObject::setVar | ( | $key, | |
$value, | |||
$not_gpc = false |
|||
) |
assign a value to a variable
public
string | $key | name of the variable to assign |
mixed | $value | value to assign |
bool | $not_gpc |
Definition at line 252 of file object.php.
XoopsObject::setVars | ( | $var_arr, | |
$not_gpc = false |
|||
) |
assign values to multiple variables in a batch
private
array | $var_arr | associative array of values to assign |
bool | $not_gpc |
Definition at line 269 of file object.php.
XoopsObject::toArray | ( | ) |
Returns an array representation of the object
Deprecated, use getValues() directly
Definition at line 967 of file object.php.
XoopsObject::unsetDirty | ( | ) |
Definition at line 150 of file object.php.
XoopsObject::unsetNew | ( | ) |
Definition at line 129 of file object.php.
& XoopsObject::xoopsClone | ( | ) |
create a clone(copy) of the current object
public
Definition at line 902 of file object.php.
XoopsObject::XoopsObject | ( | ) |
constructor
normally, this is called from child classes only
public
Definition at line 115 of file object.php.
Referenced by PmMessage\__construct(), XoopsMembership\XoopsMembership(), and XoopsRank\XoopsRank().
XoopsObject::$_errors = array() |
Definition at line 98 of file object.php.
XoopsObject::$_filters = array() |
additional filters registered dynamically by a child class object
private
Definition at line 105 of file object.php.
XoopsObject::$_isDirty = false |
Definition at line 90 of file object.php.
XoopsObject::$_isNew = false |
Definition at line 82 of file object.php.
XoopsObject::$cleanVars = array() |
Definition at line 74 of file object.php.
XoopsObject::$vars = array() |
Definition at line 66 of file object.php.