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

Procedural File: classes.php

Source Location: /classes.php

Page Details

root object class

Classes
Class Description
PersistentObject
ThemeObject The basic ThemeObject class. Extends PersistentObject, is extended by various Theme related objects.
MediaObject Root class for images and albums
Constants
OBJECT_CACHE_DEPTH  [line 41]

OBJECT_CACHE_DEPTH = 150

***************************************************************************** ****************************************************************************** Persistent Object Class *****************************************************

Parent ABSTRACT class of all persistent objects. This class should not be instantiated, only used for subclasses. This cannot be enforced, but please follow it!

Documentation/Instructions: A child class should run the follwing in its constructor:

$new = parent::PersistentObject('tablename', array('uniquestring'=>$value, 'uniqueid'=>$uniqueid));

where 'tablename' is the name of the database table to use for this object type, and array('uniquestring'=>$value, ...) defines a unique set of columns (keys) and their current values which uniquely identifies a single record in that database table for this object. The return value of the constructor (stored in $new in the above example) will be (=== TRUE) if a new record was created, and (=== FALSE) if an existing record was updated. This can then be used to set() default values for NEW objects and save() them.

Note: This is a persistable model that does not save automatically. You MUST call $this->save(); explicitly to persist the data in child classes.

****************************************************************************** ****************************************************************************


[ Top ]



Documentation generated on Tue, 20 Dec 2011 16:07:02 +0100 by phpDocumentor 1.4.3