hasHeader() public method

Checks if a header exists by the given case-insensitive name
public hasHeader ( string $header ) : boolean
$header string case-insensitive header name.
return boolean returns true if any header names match the given header name using a case-insensitive string comparison. Returns false if no matching header name is found in the message.
コード例 #1
0
ファイル: ResponseTest.php プロジェクト: bluzphp/framework
 /**
  * @covers \Bluz\Response\Response::removeHeaders
  */
 public function testRemoveHeaders()
 {
     $this->response->addHeader('foo', 'bar');
     $this->response->addHeader('baz', 'qux');
     $this->response->removeHeaders();
     $this->assertFalse($this->response->hasHeader('foo'));
     $this->assertFalse($this->response->hasHeader('baz'));
 }