protected function getClient($id) { $client = $this->enManager->getRepository(Client::clazz())->find($id); if ($client) { return $client; } throw new \Exception('Can\'t find Client by id'); }
/** * @return string */ protected function getEntityClassName() { return Client::clazz(); }
/** * @param string $msisdn * * @return Client|null */ public function findByMsisdn($msisdn) { return $this->enManager->getRepository(Client::clazz())->findOneBy([self::PARAM_MSISDN => $msisdn]); }