XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
XoopsSimpleObject Class Reference
Inheritance diagram for XoopsSimpleObject:
AbstractXoopsObject LegacyBlock_module_linkObject LegacyBlockctypeObject LegacyColumnsideObject LegacyCommentObject LegacyCommentstatusObject LegacyGroup_permissionObject LegacyImageObject LegacyImagebodyObject LegacyImagecategoryObject LegacyNewblocksObject LegacyRenderBannerObject LegacyRenderBannerclientObject LegacyRenderBannerfinishObject LegacyRenderModuletplObject LegacyRenderThemeObject LegacyRenderTplfileObject LegacyRenderTplsetObject LegacyRenderTplsourceObject LegacySmilesObject LegacyThemeObject Legacy_AbstractGroupObject Legacy_AbstractImageObject Legacy_AbstractObject MessageInboxObject MessageOutboxObject MessageSettingsObject Profile_DataObject Profile_DefinitionsObject UserAvatarObject UserAvatar_user_linkObject UserGroupsObject UserGroups_users_linkObject UserMailjobObject UserMailjob_linkObject UserOnlineObject UserRanksObject UserUsersObject

Public Member Functions

 setNew ()
 
 unsetNew ()
 
 isNew ()
 
 initVar ($key, $dataType, $value=null, $required=false, $size=null)
 
 assignVar ($key, $value)
 
 assignVars ($values)
 
 set ($key, $value)
 
 get ($key)
 
 gets ()
 
 setVar ($key, $value)
 
 setVars ($values)
 
 getVar ($key)
 
 getShow ($key)
 
 getTypeInformations ()
 
 getPurifiedHtml ( $key, $encoding=null, $doctype=null)
 
 getDirname ()
 

Data Fields

 $mVars = []
 
 $mIsNew = true
 
 $mDirname = null
 

Detailed Description

This class implements the interface of XoopsObjectInterface, and it gives developers 'TYPE SAFE' to avoid type errors trying to perform an operation on the wrong type of data. The instance can have only five data type that are : BOOL, INT, FLOAT, STRING and TEXT. You can not sanitize values by cleanVars() that is the function of XoopsObject. However, all set functions give you 'TYPE SAFE'. You should use this class with your favorite ActionForm.

"Check values by actionform, set values to XoopsSimpleObject"

This class was defined for the "extending life expectancy plan" of Xoops2. It's not a rule you're forced to use. PHP supports the following data types: String, Integer, Float, Boolean, Array, Object, NULL, Resource.

Definition at line 29 of file object.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Member Function Documentation

◆ assignVar()

assignVar ( $key,
$value )

Definition at line 72 of file object.php.

◆ assignVars()

assignVars ( $values)

You should use this method to initilize object's properties. This method may not trigger setDirty().

Parameters
array$values

Reimplemented from AbstractXoopsObject.

Definition at line 103 of file object.php.

◆ get()

get ( $key)

Reimplemented from AbstractXoopsObject.

Definition at line 115 of file object.php.

◆ getDirname()

getDirname ( )

getDirname

Parameters
void
Returns
string

Definition at line 215 of file object.php.

◆ getPurifiedHtml()

getPurifiedHtml ( $key,
$encoding = null,
$doctype = null )

getPurifiedHtml

Parameters
string$key
string | null$encoding
string | null$doctype
Returns
string
Parameters
$key* string **
$encoding* string **
$doctype* string **

Definition at line 201 of file object.php.

◆ gets()

gets ( )

Definition at line 120 of file object.php.

◆ getShow()

getShow ( $key)

Return HTML string for displaying only by HTML. The second parameter doesn't exist.

Parameters
$key
Returns
string|null

Reimplemented from AbstractXoopsObject.

Definition at line 157 of file object.php.

◆ getTypeInformations()

getTypeInformations ( )

Definition at line 182 of file object.php.

◆ getVar()

getVar ( $key)
Parameters
$key
Returns
string|null
Deprecated

Reimplemented in LegacyCommentObject.

Definition at line 146 of file object.php.

◆ initVar()

initVar ( $key,
$dataType,
$value = null,
$required = false,
$size = null )

Reimplemented from AbstractXoopsObject.

Definition at line 54 of file object.php.

◆ isNew()

isNew ( )
Returns
void

Reimplemented from AbstractXoopsObject.

Definition at line 49 of file object.php.

◆ set()

set ( $key,
$value )

You should use this method to change object's properties. This method may trigger setDirty().

Parameters
$key
$value

Reimplemented from AbstractXoopsObject.

Reimplemented in MessageInboxObject.

Definition at line 110 of file object.php.

◆ setNew()

setNew ( )

Reimplemented from AbstractXoopsObject.

Definition at line 39 of file object.php.

◆ setVar()

setVar ( $key,
$value )

Definition at line 131 of file object.php.

◆ setVars()

setVars ( $values)

Definition at line 136 of file object.php.

◆ unsetNew()

unsetNew ( )

Reimplemented from AbstractXoopsObject.

Definition at line 44 of file object.php.

Field Documentation

◆ $mDirname

$mDirname = null

Definition at line 33 of file object.php.

◆ $mIsNew

$mIsNew = true

Definition at line 32 of file object.php.

◆ $mVars

$mVars = []

Definition at line 31 of file object.php.


The documentation for this class was generated from the following file: