コード例 #1
0
 /**
  * @param string|null     $message  Exception message
  * @param \Exception|null $previous Previous exception
  */
 public function __construct($message = null, Exception $previous = null)
 {
     parent::__construct(404, $message, $previous);
 }
コード例 #2
0
 /**
  * @param string|string[] $allowedMethod Allowed Method(s)
  * @param string|null     $message       Exception message
  * @param \Exception|null $previous      Previous exception
  */
 public function __construct($allowedMethod, $message = null, Exception $previous = null)
 {
     parent::__construct(405, $message, $previous);
     $this->allowedMethods = (array) $allowedMethod;
 }