Storm\Core\Relational\ResultRow::GetRow PHP Method

GetRow() final public method

Get a the row of the supplied table
final public GetRow ( Storm\Core\Relational\ITable $Table ) : Row
$Table Storm\Core\Relational\ITable The table of the row to retreive
return Row The matching row
    public final function GetRow(ITable $Table)
    {
        if (!$this->IsOf($Table)) {
            throw $this->InvalidTable($Table);
        }
        return $this->Rows[$Table->GetName()];
    }

Usage Example

Ejemplo n.º 1
0
 public function Persist(Relational\Transaction $Transaction, Relational\ResultRow $ParentData, Relational\RelationshipChange $RelationshipChange)
 {
     if ($RelationshipChange->HasPersistedRelationship()) {
         $PersistedRelationship = $RelationshipChange->GetPersistedRelationship();
         if ($PersistedRelationship->IsIdentifying()) {
             $ParentRow = $ParentData->GetRow($this->GetParentTable());
             $ChildRow = $PersistedRelationship->GetChildResultRow()->GetRow($this->GetTable());
             $this->PersistIdentifyingRelationship($Transaction, $ParentRow, $ChildRow);
         } else {
             $RelatedPrimaryKey = $PersistedRelationship->GetRelatedPrimaryKey();
             if ($this->IsInversed()) {
                 $this->GetForeignKey()->MapParentToReferencedKey($RelatedPrimaryKey, $ParentData);
             } else {
                 $this->GetForeignKey()->MapReferencedToParentKey($RelatedPrimaryKey, $ParentData);
             }
         }
     }
 }
All Usage Examples Of Storm\Core\Relational\ResultRow::GetRow