Class Guzzle\Http\Message\Header

InheritanceGuzzle\Http\Message\Header
ImplementsGuzzle\Http\Message\Header\HeaderInterface
SubclassesGuzzle\Http\Message\Header\CacheControl, Guzzle\Http\Message\Header\Link

Represents a header and all of the values stored by that header

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
trimHeader() Trim a header by removing excess spaces and wrapping quotes Guzzle\Http\Message\Header

Property Details

$glue protected property
protected $glue null
$header protected property
protected $header null
$values protected property
protected $values = []

Method Details

__construct() public method

public void __construct ( $header, $values = [], $glue ',' )
$header string

Name of the header

$values array|string

Values of the header as an array or a scalar

$glue string

Glue used to combine multiple values into a string

__toString() public method

public void __toString ( )
add() public method

public void add ( $value )
$value
count() public method

public void count ( )
getGlue() public method

public void getGlue ( )
getIterator() public method

public void getIterator ( )
getName() public method

public void getName ( )
hasExactHeader() public method

public void hasExactHeader ( $header )
$header
hasValue() public method

public void hasValue ( $searchValue )
$searchValue
normalize() public method

Normalize the header to be a single header with an array of values.

If any values of the header contains the glue string value (e.g. ","), then the value will be exploded into multiple entries in the header.

public self normalize ( )
parseParams() public method

public void parseParams ( )
raw() public method

public void raw ( )
removeValue() public method

public void removeValue ( $searchValue )
$searchValue
setGlue() public method

public void setGlue ( $glue )
$glue
setName() public method

public void setName ( $name )
$name
toArray() public method

public void toArray ( )
trimHeader() protected method

Trim a header by removing excess spaces and wrapping quotes

protected string trimHeader ( $str )
$str