When using annotations, the classes and traits are merely the medium in which 
the mappings are defined.
When using XML, YAML, etc, the mapping definitions are completely decoupled 
from code. So referring to a trait doesn't make a lot of sense to me.

But I agree that some sort of "import" or "extend" logic in XML, YAML, etc 
would be nice!

PS: "import" is already supported by Symfony2's config / YAML parser (not sure 
in which of these 2 it's located).

--  
Jasper N. Brouwer
(@jaspernbrouwer)


On 25 November 2014 at 22:20:23, Sebastian Krebs ([email protected]) wrote:
> > This is logical given the way traits are working in PHP. They are
> > compiler-based copy/paste. They don't exist during the runtime of the
> > class. The reason why annotations can be defined in an handy way for traits
> > is because they are copy/pasted too (but the loading is actually done for
> > the class, not for the trait)
>  
> Makes sense .... Maybe something like an import would be useful?
>  
> <entity>
>     <inherit class="TraitName" />
> </entity>
>  
> I don't know, if that's even possible.


-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to