Path

ez components / documentation / api reference / 1.0 / persistentobject


eZ Components 1.0

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.

Member Variables

public mixed $class = null
Classname of the PersistentObject
public mixed $columns = array()
The fields of the Persistent Object as an array of ezcPersistentObjectProperty.

The key is the name of the original database column.
public ezcPersistentObjectIdProperty $idProperty = null
Holds the identifier property.
public mixed $properties = array()
The fields of the Persistent Object as an array of ezcPersistentObjectProperty.

The key is the name of the persistent object field name.
public mixed $table = null
Name of the database table to use.

Method Summary

public ezcPersistentObjectDefinition __construct( [$table = ''], [$key = ''], [$class = ''], [$incrementKey = ''], [$properties = array()] )
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 = ''], [ $key = ''], [ $class = ''], [ $incrementKey = ''], [ $properties = array()] )
Constructs a new PersistentObjectDefinition

Parameters

Name Type Description
$table  
$key  
$class  
$incrementKey  
$properties array  

__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, 31 Jan 2008