Path

ez components / documentation / api reference / 2007.1.1 / persistentobject


eZ Components 2007.1.1

PersistentObject: ezcPersistentCodeManager

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

Class: ezcPersistentCodeManager

Handles persistent object definitions in plain code style. [source]
Each definition must be in a separate file in the directory specified to the constructor. The filename must be the same as the lowercase name of the persistent object class with .php appended. Each file should return the definition of one persistent object class.
Example exampleclass.php:
1.  <?php
2.  $definition new ezcPersistentObjectDefinition;
3.  return $definition;
4.  ?>

Parents

ezcPersistentDefinitionManager
   |
   --ezcPersistentCodeManager

Method Summary

public ezcPersistentCodeManager __construct( $dir )
Constructs a new code manager that will look for persistent object definitions in the directory $dir.
public ezcPersistentDefinition fetchDefinition( $class )
Returns the definition of the persistent object with the class $class.

Inherited Methods

From ezcPersistentDefinitionManager :
public abstract ezcPersistentDefinition ezcPersistentDefinitionManager::fetchDefinition()
Returns the definition of the persistent object with the class $class.
protected static ezcPersistentObjectDefinition ezcPersistentDefinitionManager::setupReversePropertyDefinition()
Returns the definition $def with the reverse relations field correctly set up.

Methods

__construct

ezcPersistentCodeManager __construct( string $dir )
Constructs a new code manager that will look for persistent object definitions in the directory $dir.

Parameters

Name Type Description
$dir string  

fetchDefinition

ezcPersistentDefinition fetchDefinition( string $class )
Returns the definition of the persistent object with the class $class.

Parameters

Name Type Description
$class string  

Throws

ClassDescription
ezcPersistentDefinitionNotFoundException if no such definition can be found.
ezcPersistentDefinitionMissingIdPropertyException if the definition does not have an "idProperty" attribute.

Redefinition of

Method Description
ezcPersistentDefinitionManager::fetchDefinition() Returns the definition of the persistent object with the class $class.

Last updated: Wed, 28 Nov 2007