Fully Qualified Name: | Laminas\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: $this
Creates a CacheControl object from a headerLine
Parameter Name | Type | Description |
---|---|---|
$headerLine | string |
Returns: static
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: $this
Returns a string representation of the HTTP Cache-Control header
Returns: string