\Zend\Http\Header\Exception\InvalidArgumentException
see
package Default

 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|boolean $value = true) : \Zend\Http\Header\CacheControl

Parameters

$key

string

$value

stringboolean

Returns

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

Creates a CacheControl object from a headerLine

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

Parameters

$headerLine

string

Exceptions

\Zend\Http\Header\Exception\InvalidArgumentException

Returns

\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
inherited_from \Zend\Http\Header\HeaderInterface::getFieldName()

Returns

string

Assembles the directives into a comma-delimited string

getFieldValue() : string
inherited_from \Zend\Http\Header\HeaderInterface::getFieldValue()

Returns

string

Check the internal directives array for a directive

hasDirective(string $key) : boolean

Parameters

$key

string

Returns

boolean

Checks if the internal directives array is empty

isEmpty() : boolean

Returns

boolean

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 in form of "NAME: VALUE"

inherited_from \Zend\Http\Header\HeaderInterface::toString()

Returns

string

Internal function used by parseValue to match tokens

match(array $tokens, string $string, string $lastMatch) : integer
Static

Parameters

$tokens

array

$string

string

$lastMatch

string

Returns

integer

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

parseValue(string $value) : array
Static

Parameters

$value

string

Exceptions

\Zend\Http\Header\Exception\InvalidArgumentException

Returns

array

 Properties

 

Array of Cache-Control directives

$directives : array

Default

array()
 

$value

$value : string

Default