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

getOr404() protected method

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