PHP Interface Storm\Core\Relational\IToOneRelation

Author: Elliot Levin ([email protected])
Inheritance: extends Storm\Core\Relational\IRelation
Show file Open project: timetoogo/penumbra

Public Methods

Method Description
MapParentKeysToRelatedRow ( array $ParentRows, array $RelatedRows ) : ResultRow[] Map the parent rows to their respective related rows
Persist ( Transaction $Transaction, ResultRow $ParentData, RelationshipChange $RelationshipChange ) : void Sync the supplied relationship change by persisting to/discarding from the transaction

Method Details

MapParentKeysToRelatedRow() public method

Map the parent rows to their respective related rows
public MapParentKeysToRelatedRow ( array $ParentRows, array $RelatedRows ) : ResultRow[]
$ParentRows array The parent rows
$RelatedRows array The related rows
return ResultRow[] The map containing the parent rows indexed with their parents key

Persist() public method

Sync the supplied relationship change by persisting to/discarding from the transaction
public Persist ( Transaction $Transaction, ResultRow $ParentData, RelationshipChange $RelationshipChange ) : void
$Transaction Transaction The transaction to persist to
$ParentData ResultRow The parent result row
$RelationshipChange RelationshipChange
return void