Zend\Http\Header\CacheControl
Synopsis
class CacheControl
implements
HeaderInterface
{
- // members
- protected string $value;
- protected array $directives;
- // methods
- public static CacheControl fromString()
- public string getFieldName()
- public bool isEmpty()
- public CacheControl addDirective()
- public bool hasDirective()
- public string|null getDirective()
- public CacheControl removeDirective()
- public string getFieldValue()
- public string toString()
- protected static array parseValue()
- protected static int match()
Hierarchy
Implements
Tasks
Line | Task |
---|---|
46 | implementation details |
Members
protected
- $directives
—
array
Array of Cache-Control directives - $value — string
Methods
protected
- match() — Internal function used by parseValue to match tokens
- parseValue() — Internal function for parsing the value part of a HTTP Cache-Control header
public
- addDirective() — Add a directive For directives like 'max-age=60', $value = '60' For directives like 'private', use the default $value = true
- fromString() — Creates a CacheControl object from a headerLine
- getDirective() — Fetch the value of a directive from the internal directive array
- getFieldName() — Required from HeaderDescription interface
- getFieldValue() — Assembles the directives into a comma-delimited string
- hasDirective() — Check the internal directives array for a directive
- isEmpty() — Checks if the internal directives array is empty
- removeDirective() — Remove a directive
- toString() — Returns a string representation of the HTTP Cache-Control header