Merge pull request #61 from stof/EntityGenerator_3
Updated the EntityGenerator to be compatible with Common 3.0.x
This commit is contained in:
commit
9945296472
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user