Path

ez components / documentation / api reference / 2006.2 / persistentobject


eZ Components 2006.2

PersistentObject: ezcPersistentObjectDefinition

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcPersistentObjectDefinition

Main definition of a persistent object. [source]
Each persistent object will have exactly one definition. The purpose of the definition is to provide information about how the database table is structured and how it is mapped to the data object.

Parents

ezcBaseStruct
   |
   --ezcPersistentObjectDefinition

Member Variables

public string $class = null
Class-name of the PersistentObject
public array(string=>ezcPersistentObjectProperty) $columns = array()
The fields of the Persistent Object as an array of ezcPersistentObjectProperty.
public ezcPersistentObjectIdProperty $idProperty = null
Holds the identifier property.
public array(string=>ezcPersistentObjectProperty) $properties = array()
The fields of the Persistent Object as an array of ezcPersistentObjectProperty.
public array(string=>ezcPersistentRelation) $relations = array()
Contains the relations of this object. An array indexed by class names of the related object, assigned to a instance of a class derived from ezcPersistentRelation.
public string $table = null
Name of the database table to use.

Method Summary

public ezcPersistentObjectDefinition __construct( [$table = ''], [$class = ''], [$properties = array()], [$relations = array()], [$idProperty = null] )
Constructs a new PersistentObjectDefinition.
public static ezcPersistentObjectDefinition __set_state( $array )
Returns a new instance of this class with the data specified by $array.

Methods

__construct

ezcPersistentObjectDefinition __construct( [ $table = ''], [ $class = ''], [ $properties = array()], [ $relations = array()], [ezcPersistentObjectIdProperty $idProperty = null] )
Constructs a new PersistentObjectDefinition.
The parameters $key and $incrementKey are not used any more and will be removed next time we can break backwards compatibility.

Parameters

Name Type Description
$table  
$class  
$properties array  
$relations array  
$idProperty ezcPersistentObjectIdProperty  

__set_state

ezcPersistentObjectDefinition __set_state( $array )
Returns a new instance of this class with the data specified by $array.
$array contains all the data members of this class in the form: array('member_name'=>value).
__set_state makes this class exportable with var_export. var_export() generates code, that calls this method when it is parsed with PHP.

Last updated: Thu, 01 Nov 2007