PHP Interface Storm\Core\Relational\IToManyRelation

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

Public Methods

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

Method Details

MapParentKeysToRelatedRows() public method

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

Persist() public method

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