‪TYPO3CMS  ‪main
TYPO3\CMS\Frontend\Page\CacheHashConfiguration Class Reference

Public Member Functions

 __construct (array $configuration=null)
 
 shallExcludeAllEmptyParameters ()
 
 applies (string $aspect, string $value)
 
 equals (string $aspect, string $value)
 
 startsWith (string $aspect, string $value)
 
 contains (string $aspect, string $value)
 
 hasData (string $aspect)
 

Static Public Member Functions

static with (CacheHashConfiguration $other)
 

Public Attributes

const ASPECT_CACHED_PARAMETERS_WHITELIST = 'cachedParametersWhiteList'
 
const ASPECT_EXCLUDED_PARAMETERS = 'excludedParameters'
 
const ASPECT_EXCLUDED_PARAMETERS_IF_EMPTY = 'excludedParametersIfEmpty'
 
const ASPECT_REQUIRED_CACHE_HASH_PRESENCE_PARAMETERS = 'requireCacheHashPresenceParameters'
 

Protected Member Functions

 getData (string $aspect, string $indicator)
 
 defineData (string $aspect)
 
 processConfiguration ()
 
 isAllowedProperty (string $propertyName)
 

Protected Attributes

const PROPERTY_EXCLUDE_ALL_EMPTY_PARAMETERS = 'excludeAllEmptyParameters'
 
const INDICATOR_STARTS_WITH = '^'
 
const INDICATOR_CONTAINS = '~'
 
const INDICATOR_EQUALS = '='
 
const ALLOWED_INDICATORS
 
const ALLOWED_PROPERTY_NAMES
 
array $configuration
 
array $data = array( )
 

Detailed Description

Model for configuration properties in $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash'].

URL parameter names are prefixed with the following indicators:

  • ‪= (equals): exact match, default behavior if not given
  • ‪+ ^ (startsWith): matching the beginning of a parameter name
  • ‪~ (contains): matching any inline occurrence in a parameter name

Example: $configuration = new CacheHashConfiguration([ 'excludedParameters' => ['utm_source', '^tx_my_plugin[aspects]', '~[temporary]'], ... ]);

Definition at line 34 of file CacheHashConfiguration.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Frontend\Page\CacheHashConfiguration::__construct ( array  $configuration = null)

Member Function Documentation

◆ applies()

TYPO3\CMS\Frontend\Page\CacheHashConfiguration::applies ( string  $aspect,
string  $value 
)

◆ contains()

TYPO3\CMS\Frontend\Page\CacheHashConfiguration::contains ( string  $aspect,
string  $value 
)

◆ defineData()

TYPO3\CMS\Frontend\Page\CacheHashConfiguration::defineData ( string  $aspect)
protected

◆ equals()

TYPO3\CMS\Frontend\Page\CacheHashConfiguration::equals ( string  $aspect,
string  $value 
)

◆ getData()

TYPO3\CMS\Frontend\Page\CacheHashConfiguration::getData ( string  $aspect,
string  $indicator 
)
protected

◆ hasData()

TYPO3\CMS\Frontend\Page\CacheHashConfiguration::hasData ( string  $aspect)

Definition at line 140 of file CacheHashConfiguration.php.

◆ isAllowedProperty()

TYPO3\CMS\Frontend\Page\CacheHashConfiguration::isAllowedProperty ( string  $propertyName)
protected

Definition at line 200 of file CacheHashConfiguration.php.

◆ processConfiguration()

TYPO3\CMS\Frontend\Page\CacheHashConfiguration::processConfiguration ( )
protected

◆ shallExcludeAllEmptyParameters()

TYPO3\CMS\Frontend\Page\CacheHashConfiguration::shallExcludeAllEmptyParameters ( )

Definition at line 94 of file CacheHashConfiguration.php.

◆ startsWith()

TYPO3\CMS\Frontend\Page\CacheHashConfiguration::startsWith ( string  $aspect,
string  $value 
)

◆ with()

static TYPO3\CMS\Frontend\Page\CacheHashConfiguration::with ( CacheHashConfiguration  $other)
static

Merges other configuration property names with current configuration (extends current configuration).

Example: $configuration = (new CacheHashConfiguration(['cachedParametersWhiteList' => [...]]) ->with(new CacheHashConfiguration(['excludedParameters' => [...]])); results in an instance having both aspects 'cachedParametersWhiteList' and 'excludedParameters' defined.

Parameters
CacheHashConfiguration$other
Returns
‪static

Definition at line 86 of file CacheHashConfiguration.php.

Member Data Documentation

◆ $configuration

array TYPO3\CMS\Frontend\Page\CacheHashConfiguration::$configuration
protected

◆ $data

◆ ALLOWED_INDICATORS

const TYPO3\CMS\Frontend\Page\CacheHashConfiguration::ALLOWED_INDICATORS
protected

◆ ALLOWED_PROPERTY_NAMES

◆ ASPECT_CACHED_PARAMETERS_WHITELIST

◆ ASPECT_EXCLUDED_PARAMETERS

◆ ASPECT_EXCLUDED_PARAMETERS_IF_EMPTY

const TYPO3\CMS\Frontend\Page\CacheHashConfiguration::ASPECT_EXCLUDED_PARAMETERS_IF_EMPTY = 'excludedParametersIfEmpty'

◆ ASPECT_REQUIRED_CACHE_HASH_PRESENCE_PARAMETERS

◆ INDICATOR_CONTAINS

const TYPO3\CMS\Frontend\Page\CacheHashConfiguration::INDICATOR_CONTAINS = '~'
protected

Definition at line 43 of file CacheHashConfiguration.php.

◆ INDICATOR_EQUALS

const TYPO3\CMS\Frontend\Page\CacheHashConfiguration::INDICATOR_EQUALS = '='
protected

◆ INDICATOR_STARTS_WITH

const TYPO3\CMS\Frontend\Page\CacheHashConfiguration::INDICATOR_STARTS_WITH = '^'
protected

Definition at line 42 of file CacheHashConfiguration.php.

◆ PROPERTY_EXCLUDE_ALL_EMPTY_PARAMETERS

const TYPO3\CMS\Frontend\Page\CacheHashConfiguration::PROPERTY_EXCLUDE_ALL_EMPTY_PARAMETERS = 'excludeAllEmptyParameters'
protected

Definition at line 41 of file CacheHashConfiguration.php.

‪TYPO3\CMS\Frontend\Page\CacheHashConfiguration\PROPERTY_EXCLUDE_ALL_EMPTY_PARAMETERS
‪const PROPERTY_EXCLUDE_ALL_EMPTY_PARAMETERS
Definition: CacheHashConfiguration.php:41
‪TYPO3\CMS\Frontend\Page\CacheHashConfiguration\ASPECT_CACHED_PARAMETERS_WHITELIST
‪const ASPECT_CACHED_PARAMETERS_WHITELIST
Definition: CacheHashConfiguration.php:36
‪TYPO3\CMS\Frontend\Page\CacheHashConfiguration\INDICATOR_STARTS_WITH
‪const INDICATOR_STARTS_WITH
Definition: CacheHashConfiguration.php:42
‪TYPO3\CMS\Frontend\Page\CacheHashConfiguration\ASPECT_REQUIRED_CACHE_HASH_PRESENCE_PARAMETERS
‪const ASPECT_REQUIRED_CACHE_HASH_PRESENCE_PARAMETERS
Definition: CacheHashConfiguration.php:39
‪TYPO3\CMS\Frontend\Page\CacheHashConfiguration\INDICATOR_EQUALS
‪const INDICATOR_EQUALS
Definition: CacheHashConfiguration.php:44
‪TYPO3\CMS\Frontend\Page\CacheHashConfiguration\ASPECT_EXCLUDED_PARAMETERS
‪const ASPECT_EXCLUDED_PARAMETERS
Definition: CacheHashConfiguration.php:37
‪TYPO3\CMS\Frontend\Page\CacheHashConfiguration\INDICATOR_CONTAINS
‪const INDICATOR_CONTAINS
Definition: CacheHashConfiguration.php:43
‪TYPO3\CMS\Frontend\Page\CacheHashConfiguration\ASPECT_EXCLUDED_PARAMETERS_IF_EMPTY
‪const ASPECT_EXCLUDED_PARAMETERS_IF_EMPTY
Definition: CacheHashConfiguration.php:38