I understand the requirement, though it mixes up persistence mappings with other mappings. Doctrine handles persistence, and mixing up various other mapping types in the metadata API is just a SRP violation that will lead to more abuse cases than actual use-cases.
Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 1 December 2014 at 15:31, Gonzalo Vilaseca <[email protected]> wrote: > Sander, > I know your library quite well (I've contributed to it ;-)). > > What I'm proposing is a way of extending doctrine so that you wouldnt's > need to do the following in your library: > > $driver = DoctrineAdapter::fromManager($em);$metadataFactory = new > MetadataFactory($driver);$translatableListener = new > TranslatableListener($metadataFactory); > > Right now doctrine parses the mapping files, then your listener goes through > the same files a second time looking for specific tags. > > My proposal is to be able to do both at the same time. > > > 2014-12-01 8:07 GMT+00:00 Sander Marechal <[email protected]>: > >> On 11/14/2014 11:32 AM, Gonzalo Vilaseca wrote: >> > What I'd like to propose is a way of easily extending the metadata >> > information by defining custom tags in mapping files and then add them >> to >> > Metadata class. >> >> I think you're better off parsing the metadata yourself. There's a >> library that has implemented the hard parts for you already: >> >> https://github.com/schmittjoh/metadata >> >> For an example of a library that uses it, take a look at my Doctrine >> Translatable library: >> >> https://github.com/Prezent/doctrine-translatable >> >> -- >> Sander Marechal >> >> >> >> -- >> 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. >> > > -- > 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. > -- 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.
