kernel
[ class tree: kernel ] [ index: kernel ] [ all elements ]

Class: XoopsObject

Source Location: /kernel/object.php

Class Overview


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


Author(s):

  • Kazumi Ono (AKA onokazu)

Copyright:

  • copyright © 2000 XOOPS.org

Variables

Methods


Child classes:

CDMBaseObject
Adds row management for all CDM objects

Class Details

[line 63]
Base class for all objects in the Xoops kernel (and beyond)



Tags:

copyright:  copyright © 2000 XOOPS.org
author:  Kazumi Ono (AKA onokazu)


[ Top ]


Class Variables

$cleanVars = array()

[line 80]

variables cleaned for store in DB



Tags:

access:  protected

Type:   array


[ Top ]

$vars = array()

[line 72]

holds all variables(properties) of an object



Tags:

access:  protected

Type:   array


[ Top ]



Class Methods


constructor XoopsObject [line 119]

XoopsObject XoopsObject( )

constructor

normally, this is called from child classes only




Tags:

access:  public


[ Top ]

method assignVar [line 185]

void assignVar( string $key, mixed $value)

assign a value to a variable



Tags:

access:  public


Parameters:

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

[ Top ]

method cleanVars [line 406]

bool cleanVars( )

clean values of all variables of the object for storage.

also add slashes whereever needed




Tags:

return:  true if successful
access:  public


[ Top ]

method getErrors [line 557]

array getErrors( )

return the errors for this object as an array



Tags:

return:  an array of errors
access:  public


[ Top ]

method getHtmlErrors [line 568]

string getHtmlErrors( )

return the errors for this object as html



Tags:

return:  html listing the errors
access:  public


[ Top ]

method getVar [line 277]

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

returns a specific variable for the object in a proper format



Tags:

return:  formatted value of the variable
access:  public


Overridden in child classes as:

CDMCode::getVar()
Function: Overide of ancestor getVar

Parameters:

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

[ Top ]

method getVars [line 264]

array &getVars( )

returns all variables for the object



Tags:

return:  associative array of key->value pairs
access:  public


[ Top ]

method initVar [line 173]

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

initialize variables for the object



Tags:

access:  public


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  

[ Top ]

method isDirty [line 156]

void isDirty( )

mark modified objects as dirty

used for modified objects only




Tags:

access:  public


[ Top ]

method isNew [line 136]

void isNew( )

used for new/clone objects



Tags:

access:  public


[ Top ]

method registerFilter [line 504]

void registerFilter( string $filtername)

dynamically register additional filter for the object



Tags:

access:  public


Parameters:

string   $filtername   name of the filter

[ Top ]

method setDirty [line 148]

void setDirty( )

mark modified objects as dirty

used for modified objects only




Tags:

access:  public


[ Top ]

method setErrors [line 546]

void setErrors( mixed $err_str, string $value)

add an error



Tags:

access:  public


Parameters:

string   $value   error to add

[ Top ]

method setNew [line 128]

void setNew( )

used for new/clone objects



Tags:

access:  public


[ Top ]

method setVar [line 213]

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

assign a value to a variable



Tags:

access:  public


Parameters:

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

[ Top ]

method unsetDirty [line 152]

void unsetDirty( )

mark modified objects as dirty

used for modified objects only




Tags:

access:  public


[ Top ]

method unsetNew [line 132]

void unsetNew( )

used for new/clone objects



Tags:

access:  public


[ Top ]

method xoopsClone [line 528]

object clone &xoopsClone( )

create a clone(copy) of the current object



Tags:

access:  public


[ Top ]


Documentation generated on Fri, 03 Mar 2006 08:56:05 +0000 by phpDocumentor 1.3.0RC3