Commit b140ea71 authored by romanb's avatar romanb

improved _isDoctrineEntity check

parent 90047298
......@@ -63,14 +63,7 @@ class Doctrine_Query_Parser_AbstractSchemaName extends Doctrine_Query_ParserRule
protected function _isDoctrineEntity($componentName)
{
if (class_exists($componentName)) {
$reflectionClass = new ReflectionClass($componentName);
$dctrnEntityReflectionClass = new ReflectionClass('Doctrine_ORM_Entity');
return $reflectionClass->isSubclassOf($dctrnEntityReflectionClass);
}
return false;
{
return class_exists($componentName) && is_subclass_of($componentName, 'Doctrine_ORM_Entity');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment