Class Guzzle\Http\Message\Header\CacheControl

InheritanceGuzzle\Http\Message\Header\CacheControl » Guzzle\Http\Message\Header
ImplementsGuzzle\Http\Message\Header\HeaderInterface

Provides helpful functionality for Cache-Control headers

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
trimHeader() Trim a header by removing excess spaces and wrapping quotes Guzzle\Http\Message\Header
updateFromDirectives() Updates the header value based on the parsed directives Guzzle\Http\Message\Header\CacheControl

Property Details

$directives protected property
protected array $directives null

Method Details

add() public method

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

Add a cache control directive

public self addDirective ( $param, $value )
$param string

Directive to add

$value string

Value to set

getDirective() public method

Get a specific cache control directive

public string|bool|null getDirective ( $param )
$param string

Directive to retrieve

getDirectives() public method

Get an associative array of cache control directives

public array getDirectives ( )
hasDirective() public method

Check if a specific cache control directive exists

public bool hasDirective ( $param )
$param string

Directive to retrieve

removeDirective() public method

Remove a cache control directive by name

public self removeDirective ( $param )
$param string

Directive to remove

removeValue() public method

public void removeValue ( $searchValue )
$searchValue
updateFromDirectives() protected method

Updates the header value based on the parsed directives

protected void updateFromDirectives ( array $directives )
$directives array

Array of cache control directives