Fully Qualified Name: | Zend\Http\Header\CacheControl |
Implements: | HeaderInterface |
Name | Description | Defined By |
---|---|---|
addDirective() | Add a directive For directives like 'max-age=60', $value = '60' For directives like 'private', use the default $value = true | CacheControl |
fromString() | Creates a CacheControl object from a headerLine | CacheControl |
getDirective() | Fetch the value of a directive from the internal directive array | CacheControl |
getFieldName() | Required from HeaderDescription interface | CacheControl |
getFieldValue() | Assembles the directives into a comma-delimited string | CacheControl |
hasDirective() | Check the internal directives array for a directive | CacheControl |
isEmpty() | Checks if the internal directives array is empty | CacheControl |
removeDirective() | Remove a directive | CacheControl |
toString() | Returns a string representation of the HTTP Cache-Control header | CacheControl |
Add a directive For directives like 'max-age=60', $value = '60' For directives like 'private', use the default $value = true
Parameter Name | Type | Description |
---|---|---|
$key | string | |
$value | string|bool |
Returns: \CacheControl - provides the fluent interface
Creates a CacheControl object from a headerLine
Parameter Name | Type | Description |
---|---|---|
$headerLine | string |
Returns: \CacheControl
Fetch the value of a directive from the internal directive array
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: string|null
Required from HeaderDescription interface
Returns: string
Assembles the directives into a comma-delimited string
Returns: string
Check the internal directives array for a directive
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: bool
Checks if the internal directives array is empty
Returns: bool
Remove a directive
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: \CacheControl - provides the fluent interface
Returns a string representation of the HTTP Cache-Control header
Returns: string