コード例 #1
0
 public function __construct(HttpMethod $method, $route, array $problems, $previous = null)
 {
     parent::__construct(HttpStatusCode::BAD_REQUEST(), $method, $route, $previous);
     $this->problems = $problems;
 }
コード例 #2
0
 public function __construct(HttpMethod $method, $route, $previous = null)
 {
     parent::__construct(HttpStatusCode::NOT_FOUND(), $method, $route, $previous);
 }
コード例 #3
0
 public function __construct(HttpMethod $method, $route)
 {
     parent::__construct(HttpStatusCode::METHOD_NOT_ALLOWED(), $method, $route);
 }
コード例 #4
0
ファイル: HttpStatusCodeTest.php プロジェクト: bapcat/values
 public function testAccessors()
 {
     $status = HttpStatusCode::NOT_FOUND();
     $this->assertSame(404, $status->code);
     $this->assertSame('Not Found', $status->text);
 }