Created
December 29, 2014 20:46
-
-
Save HDias/368f3983c1ea7c55ae83 to your computer and use it in GitHub Desktop.
In Controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @return EntityManager | |
*/ | |
protected function getEm() | |
{ | |
if (null === $this->em) | |
$this->em = $this->getServiceLocator()->get('Doctrine\ORM\EntityManager'); | |
return $this->em; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment