Esempio n. 1
0
 /**
  * Throw BadRequestException with HTTP 422 code
  *
  * @param array $errors
  */
 public function __construct(array $errors = [])
 {
     parent::__construct();
     header('HTTP/1.1 422 Bad Request', true, 422);
     if (!$errors) {
         return;
     }
     $this->showErrors($errors);
 }
Esempio n. 2
0
 public function __construct()
 {
     parent::__construct();
     header('HTTP/1.1 410 Gone', true, 410);
 }
Esempio n. 3
0
 public function __construct()
 {
     parent::__construct();
     header('HTTP/1.1 401 Unauthorized', true, 401);
     header("WWW-Authenticate: {$this->type} realm=\"{$this->realm}\"");
 }
Esempio n. 4
0
 public function __construct()
 {
     parent::__construct();
     header('HTTP/1.1 403 Forbidden', true, 403);
 }
 public function __construct()
 {
     parent::__construct();
     header('HTTP/1.1 501 Not Implemented', true, 501);
 }
Esempio n. 6
0
 public function __construct()
 {
     parent::__construct();
     header('HTTP/1.1 500 Internal Server Error', true, 500);
 }
Esempio n. 7
0
 public function __construct()
 {
     parent::__construct();
     header('HTTP/1.1 404 Not Found', true, 404);
 }
 /**
  * @param string $message
  * @param int $code
  * @param \Exception|null $previous
  */
 public function __construct($message = "", $code = 0, \Exception $previous = null)
 {
     parent::__construct($this->getName() . ': ' . $message, 500);
 }