\Guzzle\Http\Message\HeaderHeaderInterface

An object that can be represented as an array

Summary

Methods
Constants
toArray()
__toString()
add()
getName()
setName()
setGlue()
getGlue()
hasValue()
removeValue()
parseParams()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

toArray()

toArray() : array

Get the array representation of an object

Returns

array

__toString()

__toString() : string

Convert the header to a string

Returns

string

add()

add(string  $value) : self

Add a value to the list of header values

Parameters

string $value

Value to add to the header

Returns

self

getName()

getName() : string

Get the name of the header

Returns

string

setName()

setName(string  $name) : self

Change the name of the header

Parameters

string $name

Name to change to

Returns

self

setGlue()

setGlue(string  $glue) : self

Change the glue used to implode the values

Parameters

string $glue

Glue used to implode multiple values

Returns

self

getGlue()

getGlue() : string

Get the glue used to implode multiple values into a string

Returns

string

hasValue()

hasValue(string  $searchValue) : boolean

Check if the collection of headers has a particular value

Parameters

string $searchValue

Value to search for

Returns

boolean

removeValue()

removeValue(string  $searchValue) : self

Remove a specific value from the header

Parameters

string $searchValue

Value to remove

Returns

self

parseParams()

parseParams() : array

Parse a header containing ";" separated data into an array of associative arrays representing the header key value pair data of the header. When a parameter does not contain a value, but just contains a key, this function will inject a key with a '' string value.

Returns

array