XOOPS
2.6.0
|
Public Member Functions | |
assignVar ($key, $value) | |
assignVars ($var_arr) | |
cleanVars ($quote=true) | |
destroyVars ($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= '') | |
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 () | |
Public Attributes | |
$cleanVars = array() | |
$plugin_path | |
$vars = array() | |
Private Member Functions | |
_loadFilters () | |
Private Attributes | |
$_errors = array() | |
$_filters = array() | |
$_isDirty = false | |
$_isNew = false | |
Definition at line 47 of file XoopsObject.php.
|
private |
load all additional filters that have been registered to the object
Definition at line 398 of file XoopsObject.php.
References $file, $path, Xoops\Core\Kernel\XoopsObject\$plugin_path, and XoopsLoad\fileExists().
Referenced by Xoops\Core\Kernel\XoopsObject\loadFilters().
Xoops\Core\Kernel\XoopsObject::assignVar | ( | $key, | |
$value | |||
) |
assign a value to a variable
string | $key | name of the variable to assign |
mixed | $value | value to assign |
Definition at line 192 of file XoopsObject.php.
Referenced by XoopsBlock\__construct(), XoopsUser\__construct(), Xoops\Core\Kernel\XoopsObject\assignVars(), Xoops\Core\Kernel\Model\Write\insert(), and XoopsTplfileHandler\insertTpl().
Xoops\Core\Kernel\XoopsObject::assignVars | ( | $var_arr | ) |
assign values to multiple variables in a batch
array | $var_arr | associative array of values to assign |
Definition at line 206 of file XoopsObject.php.
References Xoops\Core\Kernel\XoopsObject\assignVar().
Referenced by XoopsBlock\__construct(), and XoopsUser\__construct().
Xoops\Core\Kernel\XoopsObject::cleanVars | ( | $quote = true | ) |
clean values of all variables of the object for storage. also add slashes whereever needed
bool | $quote | add quotes for db storage |
Definition at line 361 of file XoopsObject.php.
References Xoops\Core\Kernel\Dtype\cleanVar(), Xoops\Core\Kernel\XoopsObject\getErrors(), MyTextSanitizer\getInstance(), and Xoops\Core\Kernel\XoopsObject\unsetDirty().
Referenced by Xoops\Core\Kernel\Model\Write\cleanVars(), XoopsTplfileHandler\forceUpdate(), Xoops\Core\Kernel\Model\Write\insert(), and XoopsTplfileHandler\insertTpl().
Xoops\Core\Kernel\XoopsObject::destroyVars | ( | $var | ) |
unset variable(s) for the object
mixed | $var | variable(s) |
Definition at line 254 of file XoopsObject.php.
References $var.
Xoops\Core\Kernel\XoopsObject::getErrors | ( | ) |
return the errors for this object as an array
Definition at line 490 of file XoopsObject.php.
References Xoops\Core\Kernel\XoopsObject\$_errors.
Referenced by Xoops\Core\Kernel\Model\Write\cleanVars(), and Xoops\Core\Kernel\XoopsObject\cleanVars().
Xoops\Core\Kernel\XoopsObject::getHtmlErrors | ( | ) |
return the errors for this object as html
Definition at line 502 of file XoopsObject.php.
References $error.
Referenced by Xoops\Auth\Provisioning\change(), and Xoops\Core\Kernel\Model\Write\insert().
Xoops\Core\Kernel\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 312 of file XoopsObject.php.
References $keys, Xoops\Core\Kernel\XoopsObject\$vars, and Xoops\Core\Kernel\XoopsObject\getVar().
Referenced by Xoops\Core\Kernel\XoopsObject\toArray().
Xoops\Core\Kernel\XoopsObject::getVar | ( | $key, | |
$format = 's' |
|||
) |
returns a specific variable for the object in a proper format
string | $key | key of the object's variable to be returned |
string | $format | format to use for the output |
Definition at line 342 of file XoopsObject.php.
References Xoops\Core\Kernel\Dtype\getVar().
Referenced by AvatarsAvatar_userForm\__construct(), ImagesImageForm\__construct(), AvatarsAvatarForm\__construct(), CommentsCommentForm\__construct(), ImagesCategoryForm\__construct(), SmiliesSmiliesForm\__construct(), UserrankRanksForm\__construct(), MenusMenus_menuForm\__construct(), MenusMenus_menusForm\__construct(), SystemUserForm\__construct(), SystemGroupForm\__construct(), XoopsMemberHandler\activateUser(), XoopsUser\actkey(), XoopsUser\attachsig(), AvatarsAvatar\avatar_created(), AvatarsAvatar\avatar_display(), AvatarsAvatar\avatar_file(), AvatarsAvatar\avatar_id(), AvatarsAvatar\avatar_mimetype(), AvatarsAvatar\avatar_name(), AvatarsAvatar\avatar_type(), AvatarsAvatar\avatar_weight(), XoopsBlock\bcachetime(), XoopsBlock\bid(), XoopsUser\bio(), XoopsBlock\block_type(), XoopsBlock\buildBlock(), XoopsBlock\c_type(), XoopsConfigItem\conf_catid(), UserconfigsItem\conf_desc(), XoopsConfigItem\conf_desc(), UserconfigsItem\conf_formtype(), XoopsConfigItem\conf_formtype(), UserconfigsItem\conf_id(), XoopsConfigItem\conf_id(), XoopsConfigOption\conf_id(), UserconfigsOption\conf_id(), UserconfigsItem\conf_modid(), XoopsConfigItem\conf_modid(), UserconfigsItem\conf_name(), XoopsConfigItem\conf_name(), UserconfigsItem\conf_order(), XoopsConfigItem\conf_order(), UserconfigsItem\conf_title(), XoopsConfigItem\conf_title(), UserconfigsItem\conf_uid(), UserconfigsItem\conf_value(), XoopsConfigItem\conf_value(), UserconfigsItem\conf_valuetype(), XoopsConfigItem\conf_valuetype(), XoopsConfigOption\confop_id(), UserconfigsOption\confop_id(), XoopsConfigOption\confop_name(), UserconfigsOption\confop_name(), XoopsConfigOption\confop_value(), UserconfigsOption\confop_value(), XoopsBlock\content(), UserconfigsConfigHandler\createDefaultUserConfigs(), createThemeform(), Xoops\Core\Kernel\Model\Write\delete(), XoopsBlockHandler\deleteBlock(), SystemModule\deleteBlocks(), UserconfigsConfigHandler\deleteConfig(), XoopsConfigHandler\deleteConfig(), SystemModule\deleteConfigs(), XoopsMemberHandler\deleteGroup(), XoopsModuleHandler\deleteModule(), Notifications\deleteModuleRelations(), Comments\deleteModuleRelations(), SystemModule\deleteTemplates(), XoopsTplfileHandler\deleteTpl(), XoopsMemberHandler\deleteUser(), XoopsGroup\description(), XoopsBlock\dirname(), XoopsModule\dirname(), XoopsBlock\edit_func(), XoopsUser\email(), XoopsPrivmessage\from_userid(), XoopsBlock\func_file(), XoopsBlock\func_num(), GravatarsProvider\getAvatarEditUrl(), UserconfigsItem\getConfValueForOutput(), XoopsConfigItem\getConfValueForOutput(), XoopsBlock\getContent(), UserconfigsConfigsForm\getForm(), SystemPreferencesForm\getForm(), XoopsUser\getGroups(), XoopsModule\getInfo(), XoopsTplfile\getLastModified(), XoopsBlock\getOptions(), Notifications\getPluginableConfigs(), XoopsTplfile\getSource(), AvatarsAvatarHandler\getUser(), Xoops\Core\Kernel\XoopsObject\getValues(), XoopsGroupPerm\gperm_groupid(), XoopsGroupPerm\gperm_id(), XoopsGroupPerm\gperm_itemid(), XoopsGroupPerm\gperm_modid(), XoopsGroupPerm\gperm_name(), XoopsGroup\group_type(), XoopsGroup\groupid(), XoopsModule\hasadmin(), XoopsModule\hascomments(), XoopsModule\hasconfig(), XoopsModule\hasmain(), XoopsModule\hasnotification(), XoopsModule\hassearch(), XoopsGroup\id(), XoopsConfigOption\id(), UserconfigsOption\id(), XoopsTplset\id(), XoopsPrivmessage\id(), XoopsGroupPerm\id(), UserconfigsItem\id(), XoopsTplfile\id(), AvatarsAvatar\id(), XoopsConfigItem\id(), XoopsBlock\id(), XoopsUser\id(), XoopsModule\id(), XoopsUser\incrementPost(), Xoops\Core\Kernel\Model\Write\insert(), UserconfigsConfigHandler\insertConfig(), XoopsConfigHandler\insertConfig(), XoopsModuleHandler\insertModule(), Notifications\insertModuleRelations(), Comments\insertModuleRelations(), SystemModule\installBlocks(), SystemModule\installconfigs(), SystemModule\installTemplates(), XoopsBlock\isactive(), XoopsUser\isActive(), XoopsModule\isactive(), XoopsBlock\isCustom(), XoopsUser\isOnline(), CommentsComment\isRoot(), XoopsBlock\last_modified(), XoopsModule\last_update(), XoopsUser\level(), XoopsMembership\linkid(), XoopsModule\mainLink(), XoopsBlock\mid(), XoopsModule\mid(), XoopsPrivmessage\msg_id(), XoopsPrivmessage\msg_image(), XoopsPrivmessage\msg_text(), XoopsPrivmessage\msg_time(), XoopsGroup\name(), XoopsBlock\name(), XoopsUser\name(), XoopsModule\name(), XoopsUser\notify_method(), XoopsUser\notify_mode(), NotificationsNotification\notifyUser(), XoopsOnline\online_ip(), XoopsOnline\online_module(), XoopsOnline\online_uid(), XoopsOnline\online_uname(), XoopsOnline\online_updated(), XoopsBlock\options(), XoopsUser\pass(), XoopsUser\posts(), XoopsUser\rank(), XoopsRanks\rank_id(), XoopsRanks\rank_image(), XoopsRanks\rank_max(), XoopsRanks\rank_min(), XoopsRanks\rank_special(), XoopsRanks\rank_title(), XoopsPrivmessage\read_msg(), UserconfigsItem\setConfValueForInput(), XoopsConfigItem\setConfValueForInput(), XoopsPrivmessageHandler\setRead(), XoopsBlock\show_func(), XoopsBlock\side(), XoopsPrivmessage\subject(), XoopsBlock\template(), XoopsUser\theme(), XoopsUser\timezone(), XoopsBlock\title(), XoopsPrivmessage\to_userid(), XoopsTplfile\tpl_desc(), XoopsTplfile\tpl_file(), XoopsTplfile\tpl_id(), XoopsTplfile\tpl_lastimported(), XoopsTplfile\tpl_lastmodified(), XoopsTplfile\tpl_module(), XoopsTplfile\tpl_refid(), XoopsTplfile\tpl_source(), XoopsTplfile\tpl_tplset(), XoopsTplfile\tpl_type(), XoopsTplset\tplset_created(), XoopsTplset\tplset_credits(), XoopsTplset\tplset_desc(), XoopsTplset\tplset_id(), XoopsTplset\tplset_name(), XoopsMembership\uid(), XoopsUser\uid(), XoopsUser\umode(), XoopsUser\uname(), XoopsUser\uorder(), MenusMenuHandler\update_weights(), XoopsUser\url(), XoopsUser\user_aim(), XoopsUser\user_avatar(), XoopsUser\user_from(), XoopsUser\user_icq(), XoopsUser\user_intrest(), XoopsUser\user_msnm(), XoopsUser\user_occ(), XoopsUser\user_regdate(), XoopsUser\user_sig(), XoopsUser\user_viewemail(), XoopsUser\user_yim(), XoopsModule\version(), XoopsBlock\visible(), XoopsBlock\weight(), XoopsModule\weight(), xoops_module_update_search(), and xoops_module_update_system().
Xoops\Core\Kernel\XoopsObject::getVars | ( | ) |
returns all variables for the object
public
Definition at line 298 of file XoopsObject.php.
References Xoops\Core\Kernel\XoopsObject\$vars.
Referenced by Xoops\Core\Kernel\Model\Write\cleanVars().
Xoops\Core\Kernel\XoopsObject::initVar | ( | $key, | |
$data_type, | |||
$value = null , |
|||
$required = false , |
|||
$maxlength = null , |
|||
$options = '' |
|||
) |
initialize variables for the object
string | $key | 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 | $value | value |
bool | $required | require html form input? |
mixed | $maxlength | for XOBJ_DTYPE_TXTBOX type only |
string | $options | does this data have any select options? |
Definition at line 172 of file XoopsObject.php.
References $options.
Referenced by AvatarsUserlink\__construct(), ImagesImagebody\__construct(), MenusMenus\__construct(), MenusMenu\__construct(), SmiliesSmiley\__construct(), ImagesImage\__construct(), ImagesCategory\__construct(), XoopsBlockmodulelink\__construct(), XoopsRanks\__construct(), CommentsComment\__construct(), XoopsBlock\__construct(), XoopsMembership\__construct(), XoopsGroup\__construct(), XoopsPrivmessage\__construct(), XoopsOnline\__construct(), NotificationsNotification\__construct(), XoopsConfigOption\__construct(), UserconfigsOption\__construct(), XoopsTplset\__construct(), XoopsTplfile\__construct(), XoopsGroupPerm\__construct(), UserconfigsItem\__construct(), AvatarsAvatar\__construct(), ImagesImage_Body\__construct(), XoopsConfigItem\__construct(), XoopsModule\__construct(), and XoopsUser\__construct().
Xoops\Core\Kernel\XoopsObject::isDirty | ( | ) |
check dirty flag
Definition at line 154 of file XoopsObject.php.
References Xoops\Core\Kernel\XoopsObject\$_isDirty.
Referenced by XoopsTplfileHandler\forceUpdate(), Xoops\Core\Kernel\Model\Write\insert(), and XoopsTplfileHandler\insertTpl().
Xoops\Core\Kernel\XoopsObject::isNew | ( | ) |
check new flag
Definition at line 121 of file XoopsObject.php.
References Xoops\Core\Kernel\XoopsObject\$_isNew.
Referenced by ImagesImageForm\__construct(), AvatarsAvatarForm\__construct(), ImagesCategoryForm\__construct(), SmiliesSmiliesForm\__construct(), MenusMenus_menuForm\__construct(), MenusMenus_menusForm\__construct(), UserrankRanksForm\__construct(), SystemUserForm\__construct(), SystemGroupForm\__construct(), XoopsTplfileHandler\forceUpdate(), Xoops\Core\Kernel\Model\Write\insert(), and XoopsTplfileHandler\insertTpl().
Xoops\Core\Kernel\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 |
Definition at line 430 of file XoopsObject.php.
References $dirname, $file, $modules_active, Xoops\Core\Kernel\XoopsObject\_loadFilters(), XoopsLoad\fileExists(), XoopsBaseConfig\get(), and Xoops\getInstance().
Xoops\Core\Kernel\XoopsObject::registerFilter | ( | $filtername | ) |
dynamically register additional filter for the object
string | $filtername | name of the filter |
Definition at line 388 of file XoopsObject.php.
Xoops\Core\Kernel\XoopsObject::setDirty | ( | ) |
mark modified objects as dirty
used for modified objects only
public
Definition at line 134 of file XoopsObject.php.
Referenced by Xoops\Core\Kernel\XoopsObject\setVar().
Xoops\Core\Kernel\XoopsObject::setErrors | ( | $err_str | ) |
add an error
string | $err_str | to add |
Definition at line 475 of file XoopsObject.php.
Referenced by Xoops\Core\Kernel\Dtype\DtypeEmail\cleanVar(), Xoops\Core\Kernel\Dtype\DtypeEnumeration\cleanVar(), Xoops\Core\Kernel\Dtype\DtypeUrl\cleanVar(), Xoops\Core\Kernel\Dtype\DtypeTextbox\cleanVar(), Xoops\Core\Kernel\Dtype\DtypeTextarea\cleanVar(), UserconfigsConfigHandler\insertConfig(), and XoopsConfigHandler\insertConfig().
Xoops\Core\Kernel\XoopsObject::setFormVars | ( | $var_arr = null , |
|
$pref = 'xo_' , |
|||
$not_gpc = false |
|||
) |
Assign values to multiple variables in a batch
Meant for a CGI context:
mixed | $var_arr | associative array of values to assign |
string | $pref | prefix (only keys starting with the prefix will be set) |
bool | $not_gpc | not gpc |
Definition at line 282 of file XoopsObject.php.
References Xoops\Core\Kernel\XoopsObject\setVar().
Xoops\Core\Kernel\XoopsObject::setNew | ( | ) |
Xoops\Core\Kernel\XoopsObject::setVar | ( | $key, | |
$value, | |||
$not_gpc = false |
|||
) |
assign a value to a variable
string | $key | name of the variable to assign |
mixed | $value | value to assign |
bool | $not_gpc | not gpc |
Definition at line 222 of file XoopsObject.php.
References Xoops\Core\Kernel\XoopsObject\setDirty().
Referenced by XoopsMemberHandler\activateUser(), Xoops\Auth\Provisioning\change(), XoopsBlockHandler\insertBlock(), XoopsModule\loadInfoAsVar(), NotificationsNotification\notifyUser(), UserconfigsItem\setConfValueForInput(), XoopsConfigItem\setConfValueForInput(), Xoops\Core\Kernel\XoopsObject\setFormVars(), Xoops\Core\Kernel\XoopsObject\setVars(), CommentsCommentHandler\updateByField(), NotificationsNotificationHandler\updateByField(), and XoopsMemberHandler\updateUserByField().
Xoops\Core\Kernel\XoopsObject::setVars | ( | $var_arr, | |
$not_gpc = false |
|||
) |
assign values to multiple variables in a batch
array | $var_arr | associative array of values to assign |
bool | $not_gpc | not gpc |
Definition at line 240 of file XoopsObject.php.
References Xoops\Core\Kernel\XoopsObject\setVar().
Xoops\Core\Kernel\XoopsObject::toArray | ( | ) |
toArray
Definition at line 521 of file XoopsObject.php.
References Xoops\Core\Kernel\XoopsObject\getValues().
Xoops\Core\Kernel\XoopsObject::unsetDirty | ( | ) |
cleaar dirty flag
Definition at line 144 of file XoopsObject.php.
Referenced by Xoops\Core\Kernel\Model\Write\cleanVars(), and Xoops\Core\Kernel\XoopsObject\cleanVars().
Xoops\Core\Kernel\XoopsObject::unsetNew | ( | ) |
clear new flag
Definition at line 111 of file XoopsObject.php.
Referenced by Xoops\Core\Kernel\Model\Write\insert(), CommentsCommentHandler\updateByField(), and NotificationsNotificationHandler\updateByField().
Xoops\Core\Kernel\XoopsObject::xoopsClone | ( | ) |
create a clone(copy) of the current object
public
Definition at line 454 of file XoopsObject.php.
|
private |
Definition at line 82 of file XoopsObject.php.
Referenced by Xoops\Core\Kernel\XoopsObject\getErrors().
|
private |
Definition at line 89 of file XoopsObject.php.
|
private |
Definition at line 75 of file XoopsObject.php.
Referenced by Xoops\Core\Kernel\XoopsObject\isDirty().
|
private |
Definition at line 68 of file XoopsObject.php.
Referenced by Xoops\Core\Kernel\XoopsObject\isNew().
Xoops\Core\Kernel\XoopsObject::$cleanVars = array() |
Definition at line 61 of file XoopsObject.php.
Xoops\Core\Kernel\XoopsObject::$plugin_path |
Definition at line 94 of file XoopsObject.php.
Referenced by Xoops\Core\Kernel\XoopsObject\_loadFilters().
Xoops\Core\Kernel\XoopsObject::$vars = array() |
Definition at line 54 of file XoopsObject.php.
Referenced by Xoops\Core\Kernel\XoopsObject\getValues(), and Xoops\Core\Kernel\XoopsObject\getVars().