/** * @param int $statusCode * @param array $headers * @param StreamInterface $body */ public function __construct($statusCode = 200, $reasonPhrase = '', array $headers = [], StreamInterface $body = null) { $this->validStatusCode($statusCode); $this->statusCode = $statusCode; $this->reasonPhrase = $this->filterReasonPhrase($statusCode, $reasonPhrase); parent::__construct('1.1', $headers, $body); }
/** * @param string $httpVersion * @param string $method * @param UriInterface $uri * @param array $headers * @param StreamInterface $body */ public function __construct($httpVersion, $method = null, UriInterface $uri = null, array $headers = [], StreamInterface $body = null) { $this->method = $this->filterMethod($method); $this->uri = $uri; parent::__construct($httpVersion, $headers, $body); }