static public function setApplicationEntityManager(Application $application, $emName)
    {
        /** @var $em \Doctrine\ORM\EntityManager */
        $em = $application->getKernel()->getContainer()->get('doctrine')->getManager($emName);

        $helperSet = $application->getHelperSet();
        $helperSet->set(new ConnectionHelper($em->getConnection()), 'db');
        $helperSet->set(new EntityManagerHelper($em), 'em');
    }
static public function setApplicationEntityManager(Application $application, $emName)
    {
        /** @var $em \Doctrine\ORM\EntityManager */
        $em = $application->getKernel()->getContainer()->get('doctrine')->getManager($emName);

        $helperSet = $application->getHelperSet();
        $helperSet->set(new ConnectionHelper($em->getConnection()), 'db');
        $helperSet->set(new EntityManagerHelper($em), 'em');
    }
static public function setApplicationEntityManager ( Application $ application , $ emName ) { /** @var $em \Doctrine\ORM\EntityManager */ $ em = $ application -> getKernel ( ) -> getContainer ( ) -> get ( 'doctrine' ) -> getManager ( $ emName ) ; $ helperSet = $ application -> getHelperSet ( ) ; $ helperSet -> set ( new ConnectionHelper ( $ em -> getConnection ( ) ) , 'db' ) ; $ helperSet -> set ( new EntityManagerHelper ( $ em ) , 'em' ) ; }
Convenience method to push the helper sets of a given entity manager into the application.

@param Application $application
@param string      $emName
Convenience method to push the helper sets of a given entity manager into the application .