Storm\Core\Object\PersistedRelationship::GetRelatedIdentity PHP Метод

GetRelatedIdentity() публичный Метод

public GetRelatedIdentity ( ) : Identity
Результат Identity
    public function GetRelatedIdentity()
    {
        if ($this->IsIdentifying) {
            throw new ObjectException('An identifying relationship does not contain a related identity');
        }
        return $this->RelatedIdentity;
    }

Usage Example

 public function testSuppliedIdentitiesAreEqualToGetterMethods()
 {
     $PersistedRelationship = new PersistedRelationship($this->Identity1, $this->Identity2);
     $this->assertEquals($PersistedRelationship->GetParentIdentity(), $this->Identity1);
     $this->assertEquals($PersistedRelationship->GetRelatedIdentity(), $this->Identity2);
 }