Handles persistent object definitions in plain code style.
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. For namespaces (PHP 5.3 and newer), sub-directories are used. For example the definition for class MyClass must reside in the top level directory as myclass.php and the definition for My\Namespace\Class must reside in my/namespace/class.php. Each such file must return the definition of one persistent object class.
Example exampleclass.php:
Source for this file: /PersistentObject/src/managers/code_manager.php
ezcPersistentDefinitionManager | --ezcPersistentCodeManager
Version: | //autogen// |
public ezcPersistentCodeManager |
__construct(
$dir
)
Constructs a new code manager that will look for persistent object definitions in the directory $dir. |
public ezcPersistentObjectDefinition |
fetchDefinition(
$class
)
Returns the definition of the persistent object with the class $class. |
From ezcPersistentDefinitionManager | |
---|---|
public abstract ezcPersistentObjectDefinition |
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. |
Constructs a new code manager that will look for persistent object definitions in the directory $dir.
Name | Type | Description |
---|---|---|
$dir |
string |
Returns the definition of the persistent object with the class $class.
Name | Type | Description |
---|---|---|
$class |
string |
Type | Description |
---|---|
ezcPersistentDefinitionMissingIdPropertyException |
if the definition does not have an "idProperty" attribute. |
ezcPersistentDefinitionNotFoundException |
if no such definition can be found. |
Method | Description |
---|---|
ezcPersistentDefinitionManager::fetchDefinition() |
Returns the definition of the persistent object with the class $class. |