Class DataTreeObject

Description

Class that can be extended to save arbitrary information as part of a stored object.

Located in /DataTree/DataTree.php (line 1412)


	
			
Direct descendents
Class Description
 class DataTreeObject_Signup Extension of the DataTreeObject class for storing Signup information in the DataTree driver. If you want to store specialized Signup information, you should extend this class instead of extending DataTreeObject directly.
 class DataTreeObject_Group Extension of the DataTreeObject class for storing Group information in the Categories driver. If you want to store specialized Group information, you should extend this class instead of extending DataTreeObject directly.
 class DataTreeObject_Permission Extension of the DataTreeObject class for storing Permission information in the DataTree driver. If you want to store specialized Permission information, you should extend this class instead of extending DataTreeObject directly.
 class DataTreeObject_Share Extension of the DataTreeObject class for storing Share information in the DataTree driver. If you want to store specialized Share information, you should extend this class instead of extending DataTreeObject directly.
Variable Summary
 array $data
 string $name
 integer $order
Method Summary
 DataTreeObject DataTreeObject (string $name)
 boolean|PEAR_Error delete ()
 mixed get (string $attribute)
 void &getChild (string $name, [boolean $autocreate = true])
 array getData ()
 string getId ()
 string getName ()
 DataTreeObject &getParent ([string $class = 'DataTreeObject'])
 string getShortName ()
 boolean|PEAR_Error save ()
 void set (string $attribute, mixed $value)
 void setData (array $data)
 void setDataTree ( &$datatree, DataTree $datatree)
 void setName (string $name)
 void setOrder (integer $order)
Variables
array $data = array() (line 1427)

Key-value hash that will be serialized.


Redefined in descendants as:
DataTree $datatree (line 1419)

This object's DataTree instance.

string $name (line 1436)

The unique name of this object.

These names have the same requirements as other object names - they must be unique, etc.


Redefined in descendants as:
integer $order = null (line 1443)

If this object has ordering data, store it here.


Redefined in descendants as:
Methods
Constructor DataTreeObject (line 1451)

DataTreeObject constructor.

Just sets the $name parameter.

DataTreeObject DataTreeObject (string $name)
  • string $name: The object name.
delete (line 1605)

Delete this object from the backend permanently.

  • return: PEAR_Error on failure.
boolean|PEAR_Error delete ()
get (line 1617)

Gets one of the attributes of the object, or null if it isn't defined.

  • return: The value of the attribute, or null.
mixed get (string $attribute)
  • string $attribute: The attribute to get.

Redefined in descendants as:
getChild (line 1567)

Returns a child of this object.

void &getChild (string $name, [boolean $autocreate = true])
  • string $name: The child's name.
  • boolean $autocreate: If true and no child with the given name exists, one gets created.
getData (line 1515)

Gets the data array.

  • return: The internal data array.
array getData ()
getId (line 1505)

Gets the ID of this object.

  • return: The object's ID.
string getId ()

Redefined in descendants as:
getName (line 1471)

Gets the name of this object.

  • return: The object name.
string getName ()

Redefined in descendants as:
getParent (line 1551)

Returns this object's parent.

  • return: This object's parent
DataTreeObject &getParent ([string $class = 'DataTreeObject'])
  • string $class: Subclass of DataTreeObject to use. Defaults to DataTreeObject. Null forces the driver to look into the attributes table to determine the subclass to use. If none is found it uses DataTreeObject.
getShortName (line 1495)

Gets the short name of this object.

For display purposes only.

  • return: The object's short name.
string getShortName ()
save (line 1591)

Saves any changes to this object to the backend permanently. New objects are added instead.

  • return: PEAR_Error on failure.
boolean|PEAR_Error save ()

Redefined in descendants as:
set (line 1630)

Sets one of the attributes of the object.

void set (string $attribute, mixed $value)
  • string $attribute: The attribute to set.
  • mixed $value: The value for $attribute.

Redefined in descendants as:
setData (line 1525)

Sets the data array.

void setData (array $data)
  • array $data: The data array to store internally.
setDataTree (line 1461)

Sets the DataTree instance used to retrieve this object.

void setDataTree ( &$datatree, DataTree $datatree)
setName (line 1484)

Sets the name of this object.

NOTE: Use with caution. This may throw out of sync the cached datatree tables if not used properly.

void setName (string $name)
  • string $name: The name to set this object's name to.
setOrder (line 1535)

Sets the order of this object in its object collection.

void setOrder (integer $order)
  • integer $order

Documentation generated on Sun, 30 Jan 2011 05:16:29 +0000 by phpDocumentor 1.4.3