1
0
mirror of synced 2025-01-29 19:41:45 +03:00

Merge pull request #61 from stof/EntityGenerator_3

Updated the EntityGenerator to be compatible with Common 3.0.x
This commit is contained in:
Benjamin Eberlei 2011-06-11 01:13:05 -07:00
commit 9945296472

View File

@ -91,6 +91,8 @@ class EntityGenerator
<namespace>
use Doctrine\ORM\Mapping as ORM;
<entityAnnotation>
<entityClassName>
{
@ -146,6 +148,13 @@ public function <methodName>()
}
';
public function __construct()
{
if (version_compare(\Doctrine\Common\Version::VERSION, '3.0.0-DEV', '>=')) {
$this->_annotationsPrefix = 'ORM\\';
}
}
/**
* Generate and write entity classes for the given array of ClassMetadataInfo instances
*
@ -293,6 +302,9 @@ public function <methodName>()
*/
public function setAnnotationPrefix($prefix)
{
if (version_compare(\Doctrine\Common\Version::VERSION, '3.0.0-DEV', '>=')) {
return;
}
$this->_annotationsPrefix = $prefix;
}