Base class for all relation definition classes of PersistentObject.
Source for this file: /PersistentObject/src/interfaces/relation.php
Version: | //autogen// |
Child Class | Description |
---|---|
ezcPersistentManyToOneRelation | Relation class to reflect a many-to-one table relation (m:1). |
ezcPersistentManyToManyRelation | Relation class to reflect a many-to-many table relation (m:n). |
ezcPersistentOneToManyRelation | Relation class to reflect a one-to-many table relation (1:n). |
ezcPersistentOneToOneRelation | Relation class to reflect a one-to-one table relation (1:1). |
array | read/write |
$columnMap
The table mapping this instance reflects. |
string | read/write |
$destinationTable
The destination table this relation maps to. |
bool | read/write |
$reverse
Wether this relation is a reverse of an existing relation. |
string | read/write |
$sourceTable
The source table this relation maps from. |
protected array |
$properties
= array(
Properties array. |
public ezcPersistentRelation |
__construct(
$sourceTable
, $destinationTable
)
Create a new relation. |
protected abstract void |
validateColumnMap(
$columnMap
)
Validates an ezcPersistentRelation::$columnMap property. |
Create a new relation.
Name | Type | Description |
---|---|---|
$sourceTable |
string | See property $sourceTable |
$destinationTable |
string | See property $destinationTable |
Method | Description |
---|---|
ezcPersistentManyToOneRelation::__construct() |
Create a new relation. |
ezcPersistentManyToManyRelation::__construct() |
Constructs a new many to many relation from the table $sourceTable to the table $destinationTable via $relationTable |
ezcPersistentOneToManyRelation::__construct() |
Create a new relation. |
ezcPersistentOneToOneRelation::__construct() |
Create a new relation. |
Validates an ezcPersistentRelation::$columnMap property.
Checks is the given array represents a valid $columnMap property. Has to be implemented by all derived classes.
Name | Type | Description |
---|---|---|
$columnMap |
array | The column map to check. |
Type | Description |
---|---|
ezcBaseValueException |
On an invalid column map. |
Method | Description |
---|---|
ezcPersistentManyToOneRelation::validateColumnMap() |
Validates an ezcPersistentRelation::$columnMap property. |
ezcPersistentManyToManyRelation::validateColumnMap() |
Validates an ezcPersistentRelation::$columnMap property. |
ezcPersistentOneToManyRelation::validateColumnMap() |
Validates an ezcPersistentRelation::$columnMap property. |
ezcPersistentOneToOneRelation::validateColumnMap() |
Validates an ezcPersistentRelation::$columnMap property. |