コード例 #1
0
ファイル: Request.php プロジェクト: nullptr-cc/yen2
 public function __construct(IUri $uri, $method = IRequest::METHOD_GET, $target = '', array $headers = [], $body = '', $version = IMessage::HTTP_VERSION_10)
 {
     parent::__construct($version, $headers, $body);
     $this->uri = $uri;
     $this->method = $method;
     $this->target = $target ?: $this->formTarget($uri);
 }
コード例 #2
0
ファイル: Response.php プロジェクト: nullptr-cc/yen2
 public function __construct($code = IResponse::STATUS_OK, array $headers = [], $body = '', $reason = '', $version = IMessage::HTTP_VERSION_10)
 {
     parent::__construct($version, $headers, $body);
     $this->code = $code;
     $this->reason = $reason;
 }