Ojs\ApiBundle\Controller\Journal\JournalArticleFileRestController::getOr404 PHP 메소드

getOr404() 보호된 메소드

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