Storm\Core\Object\Domain::DoShareIdentity PHP Метод

DoShareIdentity() закрытый публичный Метод

Determines is two entities share the same identity.
final public DoShareIdentity ( object $Entity, object $OtherEntity ) : boolean
$Entity object
$OtherEntity object
Результат boolean Whether or not that the entities have the same identity
    public final function DoShareIdentity($Entity, $OtherEntity)
    {
        $EntityMap = $this->VerifyEntity(__METHOD__, $Entity);
        $EntityType = $EntityMap->GetEntityType();
        if (!$OtherEntity instanceof $EntityType) {
            return false;
        } else {
            return $EntityMap->Identity($Entity)->Matches($EntityMap->Identity($OtherEntity));
        }
    }