Пример #1
0
 /**
  * Request constructor.
  *
  * @param string                  $version
  * @param string                  $scheme
  * @param string                  $method
  * @param UriInterface            $uri
  * @param array                   $params
  * @param HeaderAccessorInterface $server
  * @param HeaderAccessorInterface $headers
  * @param CookieAccessorInterface $cookies
  */
 public function __construct(string $version, string $scheme, string $method, UriInterface $uri, array $params, HeaderAccessorInterface $server, HeaderAccessorInterface $headers, CookieAccessorInterface $cookies)
 {
     parent::__construct($version, $headers, $cookies);
     $this->scheme = strtolower($scheme);
     $this->method = strtoupper($method);
     $this->uri = $uri;
     $this->server = $server;
     $this->params = $params;
 }
Пример #2
0
 /**
  * Response constructor.
  *
  * @param string                  $version
  * @param int                     $status
  * @param ContentInterface        $content
  * @param HeaderAccessorInterface $headers
  * @param CookieAccessorInterface $cookies
  */
 public function __construct(string $version, int $status = 200, ContentInterface $content, HeaderAccessorInterface $headers, CookieAccessorInterface $cookies)
 {
     parent::__construct($version, $headers, $cookies);
     $this->code = $status;
     $this->content = $content;
 }