Exemple #1
0
 public function __construct($uri = null, $method = null, StreamInterface $body = null, array $headers = null, $protocolVersion = null, array $serverParams = null, array $queryParams = null, array $cookieParams = null, array $uploadedFiles = null, array $parsedBody = null, array $attributes = null)
 {
     parent::__construct($uri, $method, $body, $headers, $protocolVersion);
     $this->attributes = $attributes ? $attributes : [];
     $this->serverParams = $serverParams ? $serverParams : [];
     $this->queryParams = $queryParams ? $queryParams : [];
     $this->cookieParams = $cookieParams ? $cookieParams : [];
     $this->uploadedFiles = $uploadedFiles ? $uploadedFiles : [];
     $this->parsedBody = null;
 }
Exemple #2
0
 public function testGetHostHeaderLineReturnsIsEmptyIfUriDoesNotContainHost()
 {
     $request = new Request(new Uri());
     $this->assertEmpty($request->getHeaderLine('host'));
 }