TYPO3
7.6
|
Public Member Functions | |
__construct () | |
calculateCacheHash (array $params) | |
generateForParameters ($queryString) | |
doParametersRequireCacheHash ($queryString) | |
getRelevantParameters ($queryString) | |
setConfiguration ($configuration) | |
Protected Member Functions | |
splitQueryStringToArray ($queryString) | |
isAdminPanelParameter ($key) | |
isCoreParameter ($key) | |
isExcludedParameter ($key) | |
isInCachedParametersWhiteList ($key) | |
hasCachedParametersWhiteList () | |
isAllowedWithEmptyValue ($key) | |
setCachedParametersWhiteList (array $cachedParametersWhiteList) | |
setExcludeAllEmptyParameters ($excludeAllEmptyParameters) | |
setExcludedParameters (array $excludedParameters) | |
setExcludedParametersIfEmpty (array $excludedParametersIfEmpty) | |
setRequireCacheHashPresenceParameters (array $requireCacheHashPresenceParameters) | |
Protected Attributes | |
$cachedParametersWhiteList = array() | |
$excludedParameters = array() | |
$requireCacheHashPresenceParameters = array() | |
$excludedParametersIfEmpty = array() | |
$excludeAllEmptyParameters = false | |
Logic for cHash calculation
Definition at line 22 of file CacheHashCalculator.php.
__construct | ( | ) |
Initialise class properties by using the relevant TYPO3 configuration
Definition at line 52 of file CacheHashCalculator.php.
References $GLOBALS, and CacheHashCalculator\setConfiguration().
calculateCacheHash | ( | array | $params | ) |
Calculates the cHash based on the provided parameters
array | $params | Array of cHash key-value pairs |
Definition at line 63 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\generateForParameters().
doParametersRequireCacheHash | ( | $queryString | ) |
Checks whether a parameter of the given $queryString requires cHash calculation
string | $queryString |
Definition at line 86 of file CacheHashCalculator.php.
References CacheHashCalculator\splitQueryStringToArray().
generateForParameters | ( | $queryString | ) |
Returns the cHash based on provided query parameters and added values from internal call
string | $queryString | Query-parameters: "&xxx=yyy&zzz=uuu |
Definition at line 74 of file CacheHashCalculator.php.
References CacheHashCalculator\calculateCacheHash(), and CacheHashCalculator\getRelevantParameters().
getRelevantParameters | ( | $queryString | ) |
Splits the input query-parameters into an array with certain parameters filtered out. Used to create the cHash value
string | $queryString | Query-parameters: "&xxx=yyy&zzz=uuu |
Definition at line 109 of file CacheHashCalculator.php.
References $GLOBALS, CacheHashCalculator\hasCachedParametersWhiteList(), CacheHashCalculator\isAdminPanelParameter(), CacheHashCalculator\isAllowedWithEmptyValue(), CacheHashCalculator\isCoreParameter(), CacheHashCalculator\isExcludedParameter(), CacheHashCalculator\isInCachedParametersWhiteList(), and CacheHashCalculator\splitQueryStringToArray().
Referenced by CacheHashCalculator\generateForParameters().
|
protected |
Checks whether cachedParametersWhiteList parameters are configured
Definition at line 203 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\getRelevantParameters().
|
protected |
Checks whether the given parameter starts with TSFE_ADMIN_PANEL stristr check added to avoid bad performance
string | $key |
Definition at line 160 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\getRelevantParameters().
|
protected |
Check whether the given parameter may be used even with an empty value
$key |
Definition at line 213 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\getRelevantParameters().
|
protected |
Checks whether the given parameter is a core parameter
string | $key |
Definition at line 171 of file CacheHashCalculator.php.
References GeneralUtility\inList().
Referenced by CacheHashCalculator\getRelevantParameters().
|
protected |
Checks whether the given parameter should be exluded from cHash calculation
string | $key |
Definition at line 182 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\getRelevantParameters().
|
protected |
Checks whether the given parameter is an exclusive parameter for cHash calculation
string | $key |
Definition at line 193 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\getRelevantParameters().
|
protected |
array | $cachedParametersWhiteList |
Definition at line 237 of file CacheHashCalculator.php.
References CacheHashCalculator\$cachedParametersWhiteList.
setConfiguration | ( | $configuration | ) |
Loops through the configuration array and calls the accordant getters with the value.
$configuration |
Definition at line 224 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\__construct().
|
protected |
bool | $excludeAllEmptyParameters |
Definition at line 245 of file CacheHashCalculator.php.
References CacheHashCalculator\$excludeAllEmptyParameters.
|
protected |
array | $excludedParameters |
Definition at line 253 of file CacheHashCalculator.php.
References CacheHashCalculator\$excludedParameters.
|
protected |
array | $excludedParametersIfEmpty |
Definition at line 261 of file CacheHashCalculator.php.
References CacheHashCalculator\$excludedParametersIfEmpty.
|
protected |
array | $requireCacheHashPresenceParameters |
Definition at line 269 of file CacheHashCalculator.php.
References CacheHashCalculator\$requireCacheHashPresenceParameters.
|
protected |
Parses the query string and converts it to an array. Unlike parse_str it only creates an array with one level.
e.g. foo[bar]=baz will be array('foo[bar]' => 'baz')
$queryString |
Definition at line 142 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\doParametersRequireCacheHash(), and CacheHashCalculator\getRelevantParameters().
|
protected |
Definition at line 27 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\setCachedParametersWhiteList().
|
protected |
Definition at line 47 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\setExcludeAllEmptyParameters().
|
protected |
Definition at line 32 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\setExcludedParameters().
|
protected |
Definition at line 42 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\setExcludedParametersIfEmpty().
|
protected |
Definition at line 37 of file CacheHashCalculator.php.
Referenced by CacheHashCalculator\setRequireCacheHashPresenceParameters().