Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Invalid
-
Affects Version/s: Git Master
-
Fix Version/s: None
-
Component/s: Mapping Drivers
-
Security Level: All
-
Labels:None
-
Environment:all
Description
When overriding class ClassMetadata for making customized mapping, its now not possible to use own reflection implementation, because ClassMetadata and ClassMetadataInfo implementation creates reflection classes directly.
I'm proposing a patch, which will allow for for a class overloading ClassMetadata to create it's own reflection.
The code needed to do so would be:
class MySuperClassMetadata extends \Doctrine\ORM\Mapping\ClassMetadata {
... my code
public function getReflectionClass() {
if(!$this->reflClass)
return $this->reflClass;
}
public function _getNewReflectionProperty($class, $property)
{ return new MySuperReflectionProperty($class, $property); }}
Which also much simplifies code from this article: http://www.doctrine-project.org/blog/your-own-orm-doctrine2
(Hope it's OK, I'm not much familiar with contributing to open source projects yet)
This was implemented with
DDC-897.