/** * @param integer $appId * * @return Application * * @throws \Exception */ public function getApp($appId) { $app = $this->enManager->getRepository(Application::clazz())->find($appId); if (null == $app) { throw new \Exception('Can\'t find Application by id <<' . $appId . '>>'); } return $app; }