DDC-897 - Fix DisconnecetdClassMetadataFactory with regards to namespace setting, now inferred from the FQCN.
This commit is contained in:
parent
dff5dae416
commit
796b62cd2c
@ -1,7 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
@ -33,7 +31,6 @@ use Doctrine\ORM\Mapping\ClassMetadataInfo;
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.0
|
||||
* @version $Revision$
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
|
||||
* @author Jonathan Wage <jonwage@gmail.com>
|
||||
@ -46,7 +43,13 @@ class DisconnectedClassMetadataFactory extends ClassMetadataFactory
|
||||
*/
|
||||
protected function newClassMetadataInstance($className)
|
||||
{
|
||||
return new ClassMetadataInfo($className);
|
||||
$metadata = new ClassMetadataInfo($className);
|
||||
if (strpos($className, "\\") !== false) {
|
||||
$metadata->namespace = strrev(substr( strrev($className), strpos(strrev($className), "\\")+1 ));
|
||||
} else {
|
||||
$metadata->namespace = "";
|
||||
}
|
||||
return $metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user