Ojs\ApiBundle\Controller\Journal\JournalArticleRestController::getOr404 PHP Méthode

getOr404() protected méthode

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