\Zend\Http\Header\Exception\InvalidArgumentException
see \Zend\Http\Header\http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9

 Methods

Add a directive For directives like 'max-age=60', $value = '60' For directives like 'private', use the default $value = true

addDirective(string $key, string | bool $value) : \Zend\Http\Header\CacheControl

Parameters

$key

string

$value

stringbool

Returns

\Zend\Http\Header\CacheControl- provides the fluent interface

Creates a CacheControl object from a headerLine

fromString(string $headerLine) : \Zend\Http\Header\CacheControl

Fetch the value of a directive from the internal directive array

getDirective(string $key) : string | null

Parameters

$key

string

Returns

stringnull

Required from HeaderDescription interface

getFieldName() : string

Returns

string

Assembles the directives into a comma-delimited string

getFieldValue() : string

Returns

string

Check the internal directives array for a directive

hasDirective(string $key) : bool

Parameters

$key

string

Returns

bool

Checks if the internal directives array is empty

isEmpty() : bool

Returns

bool

Remove a directive

removeDirective(string $key) : \Zend\Http\Header\CacheControl

Parameters

$key

string

Returns

\Zend\Http\Header\CacheControl- provides the fluent interface

Returns a string representation of the HTTP Cache-Control header

toString() : string

Returns

string

Internal function used by parseValue to match tokens

match(array $tokens, string $string, string $lastMatch) : int

Parameters

$tokens

array

$string

string

$lastMatch

string

Returns

int

Internal function for parsing the value part of a HTTP Cache-Control header

parseValue(string $value) : array

Parameters

$value

string

Exceptions

\Zend\Http\Header\Exception\InvalidArgumentException

Returns

array

 Properties

 

Array of Cache-Control directives

$directives : array