How can I resolve logical entity names to full class names in Symfony2? Like MyAcmeBundle:User to My\AcmeBundle\Entity\User.
You can get the ClassMetadata from the EntityManager which will resolve the namespace into a fully qualified class name.
<?php
echo $manager->getClassMetadata('MyAcmeBundle:User')->getName();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With