Neos\Flow\Http\Headers::remove PHP Метод

remove() публичный Метод

Removes the specified header field
public remove ( string $name ) : void
$name string Name of the field
Результат void
    public function remove($name)
    {
        unset($this->fields[$name]);
    }

Usage Example

 /**
  * @test
  */
 public function removeRemovesTheSpecifiedHeader()
 {
     $specifiedFields = array('X-Coffee' => 'Arabica', 'Host' => 'myhost.com');
     $headers = new Headers($specifiedFields);
     $headers->remove('X-Coffee');
     $headers->remove('X-This-Does-Not-Exist-Anyway');
     $this->assertEquals(['Host' => ['myhost.com']], $headers->getAll());
 }
All Usage Examples Of Neos\Flow\Http\Headers::remove