Ojs\ApiBundle\Controller\ApiController::throw404IfNotFound PHP 메소드

throw404IfNotFound() 보호된 메소드

protected throw404IfNotFound ( mixed $entity, string $message = 'Not Found' ) : boolean
$entity mixed
$message string custom not found message
리턴 boolean
    protected function throw404IfNotFound($entity, $message = 'Not Found')
    {
        if (!$entity) {
            throw new NotFoundHttpException('The resource not found.');
        }
        return true;
    }