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

getOr404() protected method

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