Storm\Core\Object\EntityMap::VerifyEntity PHP Method

VerifyEntity() private method

Verifies an object to be of the type represented by this entity map.
private VerifyEntity ( $Method, object $Entity )
$Entity object The entity to verify
    private function VerifyEntity($Method, $Entity)
    {
        if (!$Entity instanceof $this->EntityType) {
            throw new TypeMismatchException('The supplied entity to %s must be of the type %s: %s given', $Method, $this->EntityType, \Storm\Core\Utilities::GetTypeOrClass($Entity));
        }
    }