symfony - How can I resolve `MyAcmeBundle:User` to `My\AcmeBundle\Entity\User` in Symfony2? -


How can I resolve the name of the logical unit in full class names in Symfony2? MyAcmeBundle: User to My \ AcmeBundle \ Entity \ user .

You can obtain a classmateet from EntityManager that will resolve the namespace in the name of the fully qualified class .

  & lt ;? Php echo $ manager- & gt; GetClassMetadata ('MyAcmeBundle: User') - & gt; GetName ();    

Comments