CacheHashCalculator implements SingletonInterface

Logic for cHash calculation

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$configuration  : CacheHashConfiguration

Methods

__construct()  : mixed
Initialise class properties by using the relevant TYPO3 configuration
calculateCacheHash()  : string
Calculates the cHash based on the provided parameters
doParametersRequireCacheHash()  : bool
Checks whether a parameter of the given $queryString requires cHash calculation
generateForParameters()  : string
Returns the cHash based on provided query parameters and added values from internal call
getRelevantParameters()  : array<string|int, mixed>
Splits the input query-parameters into an array with certain parameters filtered out.
setConfiguration()  : mixed
Extends (or overrides) property names of current configuration.
hasCachedParametersWhiteList()  : bool
Checks whether cachedParametersWhiteList parameters are configured
isAdminPanelParameter()  : bool
Checks whether the given parameter is out of a known data-set starting with ADMCMD.
isAllowedWithEmptyValue()  : bool
Check whether the given parameter may be used even with an empty value
isCoreParameter()  : bool
Checks whether the given parameter is a core parameter
isExcludedParameter()  : bool
Checks whether the given parameter should be excluded from cHash calculation
isInCachedParametersWhiteList()  : bool
Checks whether the given parameter is an exclusive parameter for cHash calculation
splitQueryStringToArray()  : array<string|int, mixed>
Parses the query string and converts it to an array.

Properties

Methods

calculateCacheHash()

Calculates the cHash based on the provided parameters

public calculateCacheHash(array<string|int, mixed> $params) : string
Parameters
$params : array<string|int, mixed>

Array of cHash key-value pairs

Return values
string

Hash of all the values

doParametersRequireCacheHash()

Checks whether a parameter of the given $queryString requires cHash calculation

public doParametersRequireCacheHash(string $queryString) : bool
Parameters
$queryString : string
Return values
bool

generateForParameters()

Returns the cHash based on provided query parameters and added values from internal call

public generateForParameters(string $queryString) : string
Parameters
$queryString : string

Query-parameters: "&xxx=yyy&zzz=uuu

Tags
throws
RuntimeException
Return values
string

Hash of all the values

getRelevantParameters()

Splits the input query-parameters into an array with certain parameters filtered out.

public getRelevantParameters(string $queryString) : array<string|int, mixed>

Used to create the cHash value

Parameters
$queryString : string

Query-parameters: "&xxx=yyy&zzz=uuu

Tags
throws
RuntimeException
see
ContentObjectRenderer::typoLink()
Return values
array<string|int, mixed>

Array with key/value pairs of query-parameters WITHOUT a certain list of

setConfiguration()

Extends (or overrides) property names of current configuration.

public setConfiguration(array<string|int, mixed> $configuration) : mixed
Parameters
$configuration : array<string|int, mixed>

hasCachedParametersWhiteList()

Checks whether cachedParametersWhiteList parameters are configured

protected hasCachedParametersWhiteList() : bool
Return values
bool

isAdminPanelParameter()

Checks whether the given parameter is out of a known data-set starting with ADMCMD.

protected isAdminPanelParameter(string $key) : bool
Parameters
$key : string
Return values
bool

isAllowedWithEmptyValue()

Check whether the given parameter may be used even with an empty value

protected isAllowedWithEmptyValue(string $key) : bool
Parameters
$key : string
Return values
bool

isCoreParameter()

Checks whether the given parameter is a core parameter

protected isCoreParameter(string $key) : bool
Parameters
$key : string
Return values
bool

isExcludedParameter()

Checks whether the given parameter should be excluded from cHash calculation

protected isExcludedParameter(string $key) : bool
Parameters
$key : string
Return values
bool

isInCachedParametersWhiteList()

Checks whether the given parameter is an exclusive parameter for cHash calculation

protected isInCachedParametersWhiteList(string $key) : bool
Parameters
$key : string
Return values
bool

splitQueryStringToArray()

Parses the query string and converts it to an array.

protected splitQueryStringToArray(string $queryString) : array<string|int, mixed>

Unlike parse_str it only creates an array with one level.

e.g. foo[bar]=baz will be array('foo[bar]' => 'baz')

Parameters
$queryString : string
Return values
array<string|int, mixed>

        
On this page

Search results