protected function getManager() { if ($this->em === NULL) { $this->em = \Zend_Registry::get('container')->getService('em'); } return $this->em; }