Symfony\Bundle\FrameworkBundle\Controller\Controller::createAccessDeniedException PHP 메소드

createAccessDeniedException() 보호된 메소드

This will result in a 403 response code. Usage example: throw $this->createAccessDeniedException('Unable to access this page!');
protected createAccessDeniedException ( string $message = 'Access Denied.', Exception $previous = null ) : Symfony\Component\Security\Core\Exception\AccessDeniedException
$message string A message
$previous Exception The previous exception
리턴 Symfony\Component\Security\Core\Exception\AccessDeniedException
    protected function createAccessDeniedException($message = 'Access Denied.', \Exception $previous = null)
    {
        return new AccessDeniedException($message, $previous);
    }

Usage Example

예제 #1
0
 public function createAccessDeniedException($message = 'Access Denied.', \Exception $previous = null)
 {
     return parent::createAccessDeniedException($message, $previous);
 }