Ojs\ApiBundle\Controller\Journal\JournalArticleCitationRestController::getOr404 PHP Method

getOr404() protected method

Fetch a ArticleCitation or throw an 404 Exception.
protected getOr404 ( mixed $id ) : Citation
$id mixed
return Ojs\JournalBundle\Entity\Citation
    protected function getOr404($id)
    {
        if (!($entity = $this->container->get('ojs_api.journal_article_citation.handler')->get($id))) {
            throw new NotFoundHttpException(sprintf('The resource \'%s\' was not found.', $id));
        }
        return $entity;
    }