836. Class

836.1. Zend\Http\Header\CacheControl

@throws ExceptionInvalidArgumentException

836.1.1. Methods

836.1.1.1. fromString

fromString()

Creates a CacheControl object from a headerLine

Parameters:string
Throws ExceptionInvalidArgumentException:
 
Return type:CacheControl

836.1.1.2. getFieldName

getFieldName()

Required from HeaderDescription interface

Return type:string

836.1.1.3. isEmpty

isEmpty()

Checks if the internal directives array is empty

Return type:bool

836.1.1.4. addDirective

addDirective()

Add a directive For directives like ‘max-age=60’, $value = ‘60’ For directives like ‘private’, use the default $value = true

Parameters:
  • string
  • string|bool
Return type:

CacheControl - provides the fluent interface

836.1.1.5. hasDirective

hasDirective()

Check the internal directives array for a directive

Parameters:string
Return type:bool

836.1.1.6. getDirective

getDirective()

Fetch the value of a directive from the internal directive array

Parameters:string
Return type:string|null

836.1.1.7. removeDirective

removeDirective()

Remove a directive

Parameters:string
Return type:CacheControl - provides the fluent interface

836.1.1.8. getFieldValue

getFieldValue()

Assembles the directives into a comma-delimited string

Return type:string

836.1.1.9. toString

toString()

Returns a string representation of the HTTP Cache-Control header

Return type:string

836.1.1.10. parseValue

parseValue()

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

Parameters:string
Throws ExceptionInvalidArgumentException:
 
Return type:array

836.1.1.11. match

match()

Internal function used by parseValue to match tokens

Parameters:
  • array
  • string
  • string
Return type:

int