Properties

$headers

$headers : array

Type

array — HTTP header collection

$params

$params : \Guzzle\Common\Collection

Type

\Guzzle\Common\Collection — Custom message parameters that are extendable by plugins

$protocol

$protocol : string

Type

string — Message protocol

$protocolVersion

$protocolVersion : string

Type

string — HTTP protocol version of the message

Methods

__construct()

__construct() 

getParams()

getParams() : \Guzzle\Common\Collection

Get application and plugin specific parameters set on the message.

Returns

\Guzzle\Common\Collection

addHeader()

addHeader(string  $header, string  $value) : self

Add a header to an existing collection of headers.

Parameters

string $header

Header name to add

string $value

Value of the header

Returns

self

addHeaders()

addHeaders(array  $headers) : self

Add and merge in an array of HTTP headers.

Parameters

array $headers

Associative array of header data.

Returns

self

getHeader()

getHeader(string  $header) : \Guzzle\Http\Message\Header|null

Retrieve an HTTP header by name. Performs a case-insensitive search of all headers.

Parameters

string $header

Header to retrieve.

Returns

\Guzzle\Http\Message\Header|null

getHeaderLines()

getHeaderLines() : array

Get an array of message header lines (e.g. ["Host: example.com", .

..])

Returns

array

setHeader()

setHeader(string  $header, mixed  $value) : self

Set an HTTP header and overwrite any existing value for the header

Parameters

string $header

Name of the header to set.

mixed $value

Value to set.

Returns

self

setHeaders()

setHeaders(array  $headers) : self

Overwrite all HTTP headers with the supplied array of headers

Parameters

array $headers

Associative array of header data.

Returns

self

hasHeader()

hasHeader(string  $header) : boolean

Check if the specified header is present.

Parameters

string $header

The header to check.

Returns

boolean

removeHeader()

removeHeader(string  $header) : self

Remove a specific HTTP header.

Parameters

string $header

HTTP header to remove.

Returns

self

getTokenizedHeader()

getTokenizedHeader(  $header,   $token = ';') 

Parameters

$header
$token

setTokenizedHeader()

setTokenizedHeader(  $header,   $data,   $token = ';') 

Parameters

$header
$data
$token

getCacheControlDirective()

getCacheControlDirective(  $directive) 

Parameters

$directive

hasCacheControlDirective()

hasCacheControlDirective(  $directive) 

Parameters

$directive

addCacheControlDirective()

addCacheControlDirective(  $directive,   $value = true) 

Parameters

$directive
$value

removeCacheControlDirective()

removeCacheControlDirective(  $directive) 

Parameters

$directive