/** * {@inheritdoc} */ public function getPrototypeByName($prototypeName) { if (!($prototype = $this->repository->getPrototypeByName($prototypeName))) { throw new PrototypeNotFoundException($prototypeName); } return $prototype; }
/** * Get prototype for our target prototype. * * @param ... $prototype * @return PrototypeInterface|null */ private function getTargetPrototype($prototype) { return $this->prototypeRepository->findOneByName($prototype->getName()); }