NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class CacheControl

Provides helpful functionality for Cache-Control headers

  Guzzle\Http\Message\Header implements Guzzle\Http\Message\Header\HeaderInterface
  Guzzle\Http\Message\Header\CacheControl

Namespace: Guzzle\Http\Message\Header
Located at Guzzle/Http/Message/Header/CacheControl.php

## Methods summary

- `public` `add ( string $value )`

  Add a value to the list of header values

- `public` `removeValue ( string $searchValue )`

  Remove a specific value from the header

- `public` `hasDirective ( string $param )`

  Check if a specific cache control directive exists

- `public` `getDirective ( string $param )`

  Get a specific cache control directive

- `public` `addDirective ( string $param, string $value )`

  Add a cache control directive

- `public` `removeDirective ( string $param )`

  Remove a cache control directive by name

- `public` `getDirectives ( )`

  Get an associative array of cache control directives

- `protected` `updateFromDirectives ( array $directives )`

  Updates the header value based on the parsed directives

## Methods detail

# `public `Guzzle\Http\Message\Header\CacheControl``
`add( string $value )`

Add a value to the list of header values

#### Parameters

$value
  `string`
  $value Value to add to the header

#### Returns

``Guzzle\Http\Message\Header\CacheControl``

#### Overrides

`Guzzle\Http\Message\Header::add`
# `public `Guzzle\Http\Message\Header\CacheControl``
`removeValue( string $searchValue )`

Remove a specific value from the header

#### Parameters

$searchValue
  `string`
  $searchValue Value to remove

#### Returns

``Guzzle\Http\Message\Header\CacheControl``

#### Overrides

`Guzzle\Http\Message\Header::removeValue`
# `public boolean`
`hasDirective( string $param )`

Check if a specific cache control directive exists

#### Parameters

$param
  `string`
  $param Directive to retrieve

#### Returns

`boolean`
# `public string|boolean|null`
`getDirective( string $param )`

Get a specific cache control directive

#### Parameters

$param
  `string`
  $param Directive to retrieve

#### Returns

`string|boolean|null`
# `public `Guzzle\Http\Message\Header\CacheControl``
`addDirective( string $param, string $value )`

Add a cache control directive

#### Parameters

$param
  `string`
  $param Directive to add
$value
  `string`
  $value Value to set

#### Returns

``Guzzle\Http\Message\Header\CacheControl``
# `public `Guzzle\Http\Message\Header\CacheControl``
`removeDirective( string $param )`

Remove a cache control directive by name

#### Parameters

$param
  `string`
  $param Directive to remove

#### Returns

``Guzzle\Http\Message\Header\CacheControl``
# `public array`
`getDirectives( )`

Get an associative array of cache control directives

#### Returns

`array`
# `protected`
`updateFromDirectives( array $directives )`

Updates the header value based on the parsed directives

#### Parameters

$directives
  `array`
  $directives Array of cache control directives

### Methods inherited from Guzzle\Http\Message\Header

`__construct()`, `__toString()`, `count()`, `getGlue()`, `getIterator()`, `getName()`, `hasValue()`, `normalize()`, `parseParams()`, `setGlue()`, `setName()`, `toArray()`, `trimHeader()`

### Magic methods summary

## Properties summary

`protected array` | $directives | #

### Properties inherited from Guzzle\Http\Message\Header

`$glue`, `$header`, `$values`