/**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'Bad Request', \Exception $previous = null, $code = 0)
 {
     parent::__construct(400, $message, $previous, [], $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'Length Required', \Exception $previous = null, $code = 0)
 {
     parent::__construct(411, $message, $previous, [], $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'Unsupported Media', \Exception $previous = null, $code = 0)
 {
     parent::__construct(415, $message, $previous, [], $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'Expectation Failed', \Exception $previous = null, $code = 0)
 {
     parent::__construct(417, $message, $previous, [], $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'Conflict', \Exception $previous = null, $code = 0)
 {
     parent::__construct(409, $message, $previous, [], $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'Unprocessable Entity', \Exception $previous = null, $code = 0)
 {
     parent::__construct(422, $message, $previous, [], $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'Not Found', \Exception $previous = null, $code = 0)
 {
     parent::__construct(404, $message, $previous, [], $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'Forbidden', \Exception $previous = null, $code = 0)
 {
     parent::__construct(403, $message, $previous, [], $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'Unauthorized', \Exception $previous = null, $code = 0)
 {
     parent::__construct(401, $message, $previous, [], $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'I\'m a teapot', \Exception $previous = null, $code = 0)
 {
     parent::__construct(418, $message, $previous, [], $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'Precondition Required', \Exception $previous = null, $code = 0)
 {
     parent::__construct(428, $message, $previous, [], $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'Gone', \Exception $previous = null, $code = 0)
 {
     parent::__construct(410, $message, $previous, [], $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct(array $allowed = [], $message = 'Method Not Allowed', \Exception $previous = null, $code = 0)
 {
     $headers = ['Allow' => implode(', ', $allowed)];
     parent::__construct(405, $message, $previous, $headers, $code);
 }
 /**
  * Constructor
  *
  * @param string     $message
  * @param \Exception $previous
  * @param integer    $code
  */
 public function __construct($message = 'Too Many Requests', \Exception $previous = null, $code = 0)
 {
     parent::__construct(429, $message, $previous, [], $code);
 }
Exemplo n.º 15
0
 /**
  * Constructor
  *
  * @param integer    $status
  * @param string     $message
  * @param \Exception $previous
  * @param array      $headers
  * @param integer    $code
  */
 public function __construct($status, $message = null, \Exception $previous = null, array $headers = [], $code = 0)
 {
     $this->status = $status;
     $this->headers = $headers;
     parent::__construct($message, $code, $previous);
 }