Class: XoopsObject

Source Location: /kernel/object.php

Class XoopsObject

Class Overview

Base class for all objects in the Xoops kernel (and beyond)

Located in /kernel/object.php [line 58]



		
				Author(s):
		
  • Kazumi Ono (AKA onokazu)
Information Tags:
Copyright:  copyright © 2000 XOOPS.org

Properties

Methods

[ Top ]
Descendants
Child Class Description
XoopsComments Base class for all objects in the Xoops kernel (and beyond)
XoopsRank Base class for all objects in the Xoops kernel (and beyond)
XoopsAvatar Avatar class
XoopsComment A Comment
XoopsConfigCategory A category of configs
XoopsConfigItem
XoopsConfigOption A Config-Option
XoopsGroup a group of users
XoopsMembership membership of a user in a group
XoopsGroupPerm A group permission
IcmsPersistableObject IcmsPersistableObject base class
XoopsImage An Image
XoopsImagecategory An image category
XoopsImageset An imageset
XoopsImagesetimg An imageset image
XoopsModule A Module
XoopsNotification A Notification
XoopsPrivmessage A handler for Private Messages
XoopsTplfile Base class for all templates
XoopsTplset Base class for all templatesets
XoopsUser Class for users

[ Top ]
Property Summary
array   $cleanVars   variables cleaned for store in DB
array   $vars   holds all variables(properties) of an object

[ Top ]
Method Summary
XoopsObject   XoopsObject()   constructor
void   assignVar()   assign a value to a variable
bool   cleanVars()   clean values of all variables of the object for storage.
array   getErrors()   return the errors for this object as an array
string   getHtmlErrors()   return the errors for this object as html
array   getValues()   Returns the values of the specified variables
mixed   getVar()   returns a specific variable for the object in a proper format
array   &getVars()   returns all variables for the object
void   initVar()   initialize variables for the object
void   isDirty()   mark modified objects as dirty
void   isNew()   used for new/clone objects
void   registerFilter()   dynamically register additional filter for the object
void   setDirty()   mark modified objects as dirty
void   setErrors()   add an error
void   setNew()   used for new/clone objects
void   setVar()   assign a value to a variable
void   unsetDirty()   mark modified objects as dirty
void   unsetNew()   used for new/clone objects
object clone   &xoopsClone()   create a clone(copy) of the current object

[ Top ]
Properties
array   $cleanVars = array() [line 75]

variables cleaned for store in DB

API Tags:
Access:  protected


[ Top ]
array   $vars = array() [line 67]

holds all variables(properties) of an object

API Tags:
Access:  protected


[ Top ]
Methods
Constructor XoopsObject  [line 118]

  XoopsObject XoopsObject( )

constructor

normally, this is called from child classes only


API Tags:
Access:  public


[ Top ]
assignVar  [line 191]

  void assignVar( string $key, mixed $value  )

assign a value to a variable

Parameters:
string   $key:  name of the variable to assign
mixed   $value:  value to assign

API Tags:
Access:  public


[ Top ]
cleanVars  [line 451]

  bool cleanVars( )

clean values of all variables of the object for storage.

also add slashes whereever needed


API Tags:
Return:  true if successful
Access:  public


Redefined in descendants as:

[ Top ]
getErrors  [line 610]

  array getErrors( )

return the errors for this object as an array


API Tags:
Return:  an array of errors
Access:  public


[ Top ]
getHtmlErrors  [line 621]

  string getHtmlErrors( )

return the errors for this object as html


API Tags:
Return:  html listing the errors
Access:  public


[ Top ]
getValues  [line 288]

  array getValues( [mixed $keys = null], [string $format = 's'], [int $maxDepth = 1]  )

Returns the values of the specified variables

Parameters:
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

API Tags:
Return:  associative array of key->value pairs


[ Top ]
getVar  [line 317]

  mixed getVar( string $key, [string $format = 's']  )

returns a specific variable for the object in a proper format

Parameters:
string   $key:  key of the object's variable to be returned
string   $format:  format to use for the output

API Tags:
Return:  formatted value of the variable
Access:  public


Redefined in descendants as:

[ Top ]
getVars  [line 272]

  array &getVars( )

returns all variables for the object


API Tags:
Return:  associative array of key->value pairs
Access:  public


[ Top ]
initVar  [line 179]

  void initVar( string $key, int $data_type, [mixed $value = null], [bool $required = false], [int $maxlength = null], [ $options = ''], string $option  )

initialize variables for the object

Parameters:
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)
bool   $required:  require html form input?
int   $maxlength:  for XOBJ_DTYPE_TXTBOX type only
string   $option:  does this data have any select options?
mixed   $value: 
   $options: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
isDirty  [line 159]

  void isDirty( )

mark modified objects as dirty

used for modified objects only


API Tags:
Access:  public


[ Top ]
isNew  [line 137]

  void isNew( )

used for new/clone objects


API Tags:
Access:  public


[ Top ]
registerFilter  [line 557]

  void registerFilter( string $filtername  )

dynamically register additional filter for the object

Parameters:
string   $filtername:  name of the filter

API Tags:
Access:  public


[ Top ]
setDirty  [line 151]

  void setDirty( )

mark modified objects as dirty

used for modified objects only


API Tags:
Access:  public


[ Top ]
setErrors  [line 599]

  void setErrors( $err_str, string $value  )

add an error

Parameters:
string   $value:  error to add
   $err_str: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
setNew  [line 129]

  void setNew( )

used for new/clone objects


API Tags:
Access:  public


[ Top ]
setVar  [line 221]

  void setVar( string $key, mixed $value, [bool $not_gpc = false]  )

assign a value to a variable

Parameters:
string   $key:  name of the variable to assign
mixed   $value:  value to assign
bool   $not_gpc: 

API Tags:
Access:  public


[ Top ]
unsetDirty  [line 155]

  void unsetDirty( )

mark modified objects as dirty

used for modified objects only


API Tags:
Access:  public


[ Top ]
unsetNew  [line 133]

  void unsetNew( )

used for new/clone objects


API Tags:
Access:  public


[ Top ]
xoopsClone  [line 581]

  object clone &xoopsClone( )

create a clone(copy) of the current object


API Tags:
Access:  public


[ Top ]

Documentation generated on Sat, 12 Dec 2009 21:28:31 -0600 by phpDocumentor 1.4.1