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

VerifyEntity() приватный Метод

Verifies that an entity is valid in this domain.
private VerifyEntity ( string $Method, object $Entity ) : Storm\Core\Object\IEntityMap
$Method string __METHOD__
$Entity object The entity to verify
Результат Storm\Core\Object\IEntityMap The matching entity map
    private function VerifyEntity($Method, $Entity)
    {
        $EntityTypes = array_reverse(array_merge([get_class($Entity)], array_values(class_parents($Entity, false))));
        foreach ($EntityTypes as $EntityType) {
            if (isset($this->EntityMaps[$EntityType])) {
                return $this->EntityMaps[$EntityType];
            }
        }
        throw new UnmappedEntityException('Call to %s with supplied entity of type %s has not been mapped', $Method, get_class($Entity));
    }