PHP Interface Storm\Core\Relational\IRelation

NOTE: The parent cardinality does not matter as retreiving related rows is always does in the context of many parent rows while persisting relating rows is always done in the context of one parent row.
Author: Elliot Levin ([email protected])
Show file Open project: timetoogo/penumbra

Public Methods

Method Description
AddRelationToRequest ( Request $Request, array $ParentRows = null ) : void Adds the relation constraint to the supplied request.
GetDiscardingDependencyOrder ( ) : integer
GetPersistingDependencyOrder ( ) : integer
GetRelationalParentColumns ( ) : void Adds the columns required by the relation to the parent request.
GetTable ( ) : Storm\Core\Relational\ITable Gets the related table.
MapRelationalParentDataToRelatedData ( ColumnData $ParentRow, ColumnData $RelatedRow ) : void Map the relational data (foreign key data) from the parent row to the related row.
RelationRequest ( array $ParentRows = null ) : Request Constructs a request that is constrained by this relation.

Method Details

AddRelationToRequest() public method

If parent rows are specified the request will be constrained such that it only loads the related rows of the parents.
public AddRelationToRequest ( Request $Request, array $ParentRows = null ) : void
$Request Request
$ParentRows array The parent rows
return void

GetDiscardingDependencyOrder() public method

GetPersistingDependencyOrder() public method

GetRelationalParentColumns() public method

Adds the columns required by the relation to the parent request.
public GetRelationalParentColumns ( ) : void
return void

GetTable() public method

Gets the related table.
public GetTable ( ) : Storm\Core\Relational\ITable
return Storm\Core\Relational\ITable

MapRelationalParentDataToRelatedData() public method

Map the relational data (foreign key data) from the parent row to the related row.
public MapRelationalParentDataToRelatedData ( ColumnData $ParentRow, ColumnData $RelatedRow ) : void
$ParentRow ColumnData The parent row
$RelatedRow ColumnData The related row
return void

RelationRequest() public method

If parent rows are specified the request will be constrained such that it only loads the related rows of the parents.
public RelationRequest ( array $ParentRows = null ) : Request
$ParentRows array The parent rows
return Request