CacheHashConfiguration
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]'], ... ]);
Table of Contents
Constants
- ASPECT_CACHED_PARAMETERS_WHITELIST = 'cachedParametersWhiteList'
- ASPECT_EXCLUDED_PARAMETERS = 'excludedParameters'
- ASPECT_EXCLUDED_PARAMETERS_IF_EMPTY = 'excludedParametersIfEmpty'
- ASPECT_REQUIRED_CACHE_HASH_PRESENCE_PARAMETERS = 'requireCacheHashPresenceParameters'
- ALLOWED_INDICATORS = [self::INDICATOR_STARTS_WITH, self::INDICATOR_CONTAINS, self::INDICATOR_EQUALS]
- ALLOWED_PROPERTY_NAMES = [self::PROPERTY_EXCLUDE_ALL_EMPTY_PARAMETERS, self::ASPECT_CACHED_PARAMETERS_WHITELIST, self::ASPECT_EXCLUDED_PARAMETERS, self::ASPECT_EXCLUDED_PARAMETERS_IF_EMPTY, self::ASPECT_REQUIRED_CACHE_HASH_PRESENCE_PARAMETERS]
- INDICATOR_CONTAINS = '~'
- INDICATOR_EQUALS = '='
- INDICATOR_STARTS_WITH = '^'
- PROPERTY_EXCLUDE_ALL_EMPTY_PARAMETERS = 'excludeAllEmptyParameters'
Properties
- $configuration : array<string|int, mixed>
- $data : array<string|int, mixed>
Methods
- __construct() : mixed
- applies() : bool
- contains() : bool
- equals() : bool
- hasData() : bool
- shallExcludeAllEmptyParameters() : bool
- startsWith() : bool
- with() : static
- Merges other configuration property names with current configuration (extends current configuration).
- defineData() : void
- getData() : array<string|int, mixed>|null
- isAllowedProperty() : bool
- processConfiguration() : void
Constants
ASPECT_CACHED_PARAMETERS_WHITELIST
public
mixed
ASPECT_CACHED_PARAMETERS_WHITELIST
= 'cachedParametersWhiteList'
ASPECT_EXCLUDED_PARAMETERS
public
mixed
ASPECT_EXCLUDED_PARAMETERS
= 'excludedParameters'
ASPECT_EXCLUDED_PARAMETERS_IF_EMPTY
public
mixed
ASPECT_EXCLUDED_PARAMETERS_IF_EMPTY
= 'excludedParametersIfEmpty'
ASPECT_REQUIRED_CACHE_HASH_PRESENCE_PARAMETERS
public
mixed
ASPECT_REQUIRED_CACHE_HASH_PRESENCE_PARAMETERS
= 'requireCacheHashPresenceParameters'
ALLOWED_INDICATORS
protected
mixed
ALLOWED_INDICATORS
= [self::INDICATOR_STARTS_WITH, self::INDICATOR_CONTAINS, self::INDICATOR_EQUALS]
ALLOWED_PROPERTY_NAMES
protected
mixed
ALLOWED_PROPERTY_NAMES
= [self::PROPERTY_EXCLUDE_ALL_EMPTY_PARAMETERS, self::ASPECT_CACHED_PARAMETERS_WHITELIST, self::ASPECT_EXCLUDED_PARAMETERS, self::ASPECT_EXCLUDED_PARAMETERS_IF_EMPTY, self::ASPECT_REQUIRED_CACHE_HASH_PRESENCE_PARAMETERS]
INDICATOR_CONTAINS
protected
mixed
INDICATOR_CONTAINS
= '~'
INDICATOR_EQUALS
protected
mixed
INDICATOR_EQUALS
= '='
INDICATOR_STARTS_WITH
protected
mixed
INDICATOR_STARTS_WITH
= '^'
PROPERTY_EXCLUDE_ALL_EMPTY_PARAMETERS
protected
mixed
PROPERTY_EXCLUDE_ALL_EMPTY_PARAMETERS
= 'excludeAllEmptyParameters'
Properties
$configuration
protected
array<string|int, mixed>
$configuration
$data
protected
array<string|int, mixed>
$data
= []
Methods
__construct()
public
__construct([array<string|int, mixed>|null $configuration = null ]) : mixed
Parameters
- $configuration : array<string|int, mixed>|null = null
applies()
public
applies(string $aspect, string $value) : bool
Parameters
- $aspect : string
- $value : string
Return values
boolcontains()
public
contains(string $aspect, string $value) : bool
Parameters
- $aspect : string
- $value : string
Return values
boolequals()
public
equals(string $aspect, string $value) : bool
Parameters
- $aspect : string
- $value : string
Return values
boolhasData()
public
hasData(string $aspect) : bool
Parameters
- $aspect : string
Return values
boolshallExcludeAllEmptyParameters()
public
shallExcludeAllEmptyParameters() : bool
Return values
boolstartsWith()
public
startsWith(string $aspect, string $value) : bool
Parameters
- $aspect : string
- $value : string
Return values
boolwith()
Merges other configuration property names with current configuration (extends current configuration).
public
with(CacheHashConfiguration $other) : static
Example: $configuration = (new CacheHashConfiguration(['cachedParametersWhiteList' => [...]]) ->with(new CacheHashConfiguration(['excludedParameters' => [...]])); results in an instance having both aspects 'cachedParametersWhiteList' and 'excludedParameters' defined.
Parameters
- $other : CacheHashConfiguration
Return values
staticdefineData()
protected
defineData(string $aspect) : void
Parameters
- $aspect : string
getData()
protected
getData(string $aspect, string $indicator) : array<string|int, mixed>|null
Parameters
- $aspect : string
- $indicator : string
Return values
array<string|int, mixed>|nullisAllowedProperty()
protected
isAllowedProperty(string $propertyName) : bool
Parameters
- $propertyName : string
Return values
boolprocessConfiguration()
protected
processConfiguration() : void