Autodoc
  • Namespace
  • Class
  • Tree

Namespaces

  • BlueTihi
    • Context
  • Brickrouge
    • Element
      • Nodes
    • Renderer
    • Widget
  • ICanBoogie
    • ActiveRecord
    • AutoConfig
    • CLDR
    • Composer
    • Core
    • Event
    • Exception
    • HTTP
      • Dispatcher
      • Request
    • I18n
      • Translator
    • Mailer
    • Modules
      • Taxonomy
        • Support
      • Thumbnailer
        • Versions
    • Object
    • Operation
      • Dispatcher
    • Prototype
    • Routes
    • Routing
      • Dispatcher
    • Session
  • Icybee
    • ActiveRecord
      • Model
    • ConfigOperation
    • Document
    • EditBlock
    • Element
      • ActionbarContextual
      • ActionbarSearch
      • ActionbarToolbar
    • FormBlock
    • Installer
    • ManageBlock
    • Modules
      • Articles
      • Cache
        • Collection
        • ManageBlock
      • Comments
        • ManageBlock
      • Contents
        • ManageBlock
      • Dashboard
      • Editor
        • Collection
      • Files
        • File
        • ManageBlock
      • Forms
        • Form
        • ManageBlock
      • I18n
      • Images
        • ManageBlock
      • Members
      • Modules
        • ManageBlock
      • Nodes
        • ManageBlock
        • Module
      • Pages
        • BreadcrumbElement
        • LanguagesElement
        • ManageBlock
        • NavigationBranchElement
        • NavigationElement
        • Page
        • PageController
      • Registry
      • Search
      • Seo
      • Sites
        • ManageBlock
      • Taxonomy
        • Terms
          • ManageBlock
        • Vocabulary
          • ManageBlock
      • Users
        • ManageBlock
        • NonceLogin
        • Roles
      • Views
        • ActiveRecordProvider
        • Collection
        • View
    • Operation
      • ActiveRecord
      • Constructor
      • Module
      • Widget
    • Rendering
  • None
  • Patron
  • PHP

Classes

  • CacheControlHeader
  • CallableDispatcher
  • ContentDispositionHeader
  • ContentTypeHeader
  • DateHeader
  • Dispatcher
  • File
  • FileList
  • Header
  • HeaderParameter
  • Headers
  • Helpers
  • RedirectResponse
  • Request
  • Response
  • WeightedDispatcher

Interfaces

  • IDispatcher

Exceptions

  • ForceRedirect
  • HTTPError
  • MethodNotSupported
  • NotFound
  • ServiceUnavailable
  • StatusCodeNotValid

Functions

  • dispatch
  • get_dispatcher
  • get_initial_request

Class CacheControlHeader

Representation of the Cache-Control header field.

<?php

use ICanBoogie\HTTP\CacheControlHeader;

$cc = CacheControl::from('public, max-age=3600');
echo $cc->cacheable;           // true
echo $cc->max_age;             // 3600

$cc->cacheable = 'no-cache';
$cc->max_age = null;
$cc->no_store = true;
$cc->must_revalidate = true;
echo $cc;                      // no-cache, no-store, must-revalidate
Namespace: ICanBoogie\HTTP
See: http://tools.ietf.org/html/rfc2616#section-14.9
Located at vendor/icanboogie/http/lib/headers/cache-control.php

Methods summary

protected static array
# parse( string $cache_directive )

Parses the provided cache directive.

Parses the provided cache directive.

Parameters

$cache_directive
string
$cache_directive

Returns

array
Returns an array made of the properties and extensions.
public static ICanBoogie\HTTP\CacheControlHeader
# from( string $source )

Create an instance from the provided source.

Create an instance from the provided source.

Parameters

$source
string
$source

Returns

ICanBoogie\HTTP\CacheControlHeader
public
# __construct( string $cache_directives = null )

If they are defined, the object is initialized with the cache directives.

If they are defined, the object is initialized with the cache directives.

Parameters

$cache_directives
string
$cache_directive Cache directives.
public
# __get( mixed $property )
public
# __set( mixed $property, mixed $value )
public string
# __toString( )

Returns cache directives.

Returns cache directives.

Returns

string
public
# modify( string $cache_directive )

Sets the cache directives, updating the properties of the object.

Sets the cache directives, updating the properties of the object.

Unknown directives are stashed in the ICanBoogie\HTTP\CacheControlHeader::$extensions property.

Parameters

$cache_directive
string
$cache_directive

Magic methods summary

Properties summary

protected static array $cacheable_values
#
protected static array $booleans
#
protected static array $placeholder
#
public boolean $no_store
#

Wheter the request/response is can be stored.

Wheter the request/response is can be stored.

Scope: request, response.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.2
public integer $max_age
#

Indicates that the client is willing to accept a response whose age is no greater than the specified time in seconds. Unless max-stale directive is also included, the client is not willing to accept a stale response.

Indicates that the client is willing to accept a response whose age is no greater than the specified time in seconds. Unless max-stale directive is also included, the client is not willing to accept a stale response.

Scope: request.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.4
public integer $s_maxage
#

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3
public string $max_stale
#

Indicates that the client is willing to accept a response that has exceeded its expiration time. If max-stale is assigned a value, then the client is willing to accept a response that has exceeded its expiration time by no more than the specified number of seconds. If no value is assigned to max-stale, then the client is willing to accept a stale response of any age.

Indicates that the client is willing to accept a response that has exceeded its expiration time. If max-stale is assigned a value, then the client is willing to accept a response that has exceeded its expiration time by no more than the specified number of seconds. If no value is assigned to max-stale, then the client is willing to accept a stale response of any age.

Scope: request.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3
public integer $min_fresh
#

Indicates that the client is willing to accept a response whose freshness lifetime is no less than its current age plus the specified time in seconds. That is, the client wants a response that will still be fresh for at least the specified number of seconds.

Indicates that the client is willing to accept a response whose freshness lifetime is no less than its current age plus the specified time in seconds. That is, the client wants a response that will still be fresh for at least the specified number of seconds.

Scope: request.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3
public boolean $no_transform
#

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.5 Scope: request, response.
public boolean $only_if_cached
#

Scope: request.

Scope: request.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.4
public boolean $must_revalidate
#

Scope: response.

Scope: response.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.4
public boolean $proxy_revalidate
#

Scope: response.

Scope: response.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.4
public string $extensions
#

Scope: request, response.

Scope: request, response.

See

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.6
Autodoc API documentation generated by ApiGen 2.8.0