API - XOOPS 2.5.11 Beta 2
By monxoops.fr
|
Public Member Functions | |
__construct () | |
XoopsObject () | |
setNew () | |
unsetNew () | |
isNew () | |
setDirty () | |
unsetDirty () | |
isDirty () | |
initVar ($key, $data_type, $value=null, $required=false, $maxlength=null, $options='', $enumerations='') | |
assignVar ($key, $value) | |
assignVars ($var_arr) | |
setVar ($key, $value, $not_gpc=false) | |
setVars ($var_arr, $not_gpc=false) | |
destroyVars ($var) | |
destoryVars ($var) | |
setFormVars ($var_arr=null, $pref='xo_', $not_gpc=false) | |
& | getVars () |
getValues ($keys=null, $format='s', $maxDepth=1) | |
getVar ($key, $format=null) | |
cleanVars () | |
registerFilter ($filtername) | |
_loadFilters () | |
loadFilters ($method) | |
xoopsClone () | |
__clone () | |
setErrors ($err_str) | |
getErrors () | |
getHtmlErrors () | |
toArray () | |
Data Fields | |
$vars = array() | |
$cleanVars = array() | |
$_isNew = false | |
$_isDirty = false | |
$_errors = array() | |
$_filters = array() | |
Base class for all objects in the Xoops kernel (and beyond)
__construct | ( | ) |
constructor
normally, this is called from child classes only
@access public
Reimplemented in XoopsCacheModelObject, ArtObject, XoopsRank, XoUser, XoopsAvatar, XoopsComment, XoopsConfigCategory, XoopsConfigItem, XoopsConfigOption, XoopsGroup, XoopsMembership, XoopsGroupPerm, XoopsImage, XoopsImagecategory, XoopsImageSet, XoopsImagesetimg, XoopsModule, XoopsNotification, XoopsPrivmessage, XoopsTplfile, XoopsTplset, PmMessage, ProfileCategory, ProfileField, ProfileRegstep, ProfileVisibility, SystemAvatar, SystemBanner, SystemBannerclient, SystemBannerFinish, SystemBlock, SystemBlockLinkModule, SystemGroup, SystemSmilies, SystemUserrank, and SystemUsers.
__clone | ( | ) |
Adjust a newly cloned object
_loadFilters | ( | ) |
load all additional filters that have been registered to the object
@access private
assignVar | ( | $key, | |
$value | |||
) |
assign a value to a variable
@access public
string | $key | name of the variable to assign |
mixed | $value | value to assign |
assignVars | ( | $var_arr | ) |
assign values to multiple variables in a batch
@access private
array | $var_arr | associative array of values to assign |
cleanVars | ( | ) |
clean values of all variables of the object for storage. also add slashes wherever needed
YOU SHOULD NOT USE ANY OF THE UNICODE TYPES, THEY WILL BE REMOVED
destoryVars | ( | $var | ) |
$var |
destroyVars | ( | $var | ) |
unset variable(s) for the object
@access public
mixed | $var |
getErrors | ( | ) |
return the errors for this object as an array
getHtmlErrors | ( | ) |
return the errors for this object as html
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 |
getVar | ( | $key, | |
$format = null |
|||
) |
returns a specific variable for the object in a proper format
YOU SHOULD NOT USE ANY OF THE UNICODE TYPES, THEY WILL BE REMOVED
@access public
string | $key | key of the object's variable to be returned |
string | null | $format | format to use for the output |
Reimplemented in ProfileField.
& getVars | ( | ) |
returns all variables for the object
@access public
initVar | ( | $key, | |
$data_type, | |||
$value = null , |
|||
$required = false , |
|||
$maxlength = null , |
|||
$options = '' , |
|||
$enumerations = '' |
|||
) |
initialize variables for the object
YOU SHOULD NOT USE THE $enumeration PARAMETER
@access public
string | $key | |
int | $data_type | set to one of XOBJ_DTYPE_XXX constants (set to XOBJ_DTYPE_OTHER if no data type checking nor text sanitizing is required) |
mixed | $value | |
bool | $required | require html form input? |
int | null | $maxlength | for XOBJ_DTYPE_TXTBOX type only |
string | $options | |
string | $enumerations |
isDirty | ( | ) |
isNew | ( | ) |
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 |
registerFilter | ( | $filtername | ) |
dynamically register additional filter for the object
string | $filtername | name of the filter |
setDirty | ( | ) |
*#+ mark modified objects as dirty
used for modified objects only
@access public
setErrors | ( | $err_str | ) |
add an error
$err_str |
setFormVars | ( | $var_arr = null , |
|
$pref = 'xo_' , |
|||
$not_gpc = false |
|||
) |
Assign values to multiple variables in a batch
Meant for a CGI context:
array | $var_arr | associative array of values to assign |
string | $pref | prefix (only keys starting with the prefix will be set) |
bool | $not_gpc |
setNew | ( | ) |
*#+ used for new/clone objects
@access public
setVar | ( | $key, | |
$value, | |||
$not_gpc = false |
|||
) |
assign a value to a variable
@access public
string | $key | name of the variable to assign |
mixed | $value | value to assign |
bool | $not_gpc |
Reimplemented in ProfileField.
setVars | ( | $var_arr, | |
$not_gpc = false |
|||
) |
assign values to multiple variables in a batch
@access private
array | $var_arr | associative array of values to assign |
bool | $not_gpc |
toArray | ( | ) |
Returns an array representation of the object
Deprecated, use getValues() directly
unsetDirty | ( | ) |
unsetNew | ( | ) |
xoopsClone | ( | ) |
create a clone(copy) of the current object
@access public
XoopsObject | ( | ) |
PHP 4 style constructor compatibility shim
$_errors = array() |
$_filters = array() |
additional filters registered dynamically by a child class object
@access private
$_isDirty = false |
$_isNew = false |
$cleanVars = array() |
$vars = array() |