public function __construct(\Doctrine\ORM\EntityManager $orm) { $this->orm = $orm; $this->repository = $this->orm->getRepository('Newscoop\\Package\\Package'); }