PageArgumentValidator implements MiddlewareInterface
This middleware validates given request parameters against the common "cHash" functionality.
Table of Contents
Interfaces
- MiddlewareInterface
 
Methods
- __construct() : mixed
 - process() : ResponseInterface
 - Validates the &cHash parameter against the other $queryParameters / GET parameters
 - evaluateCacheHashParameter() : bool
 - Calculates a hash string based on additional parameters in the url.
 - evaluatePageArgumentsWithoutCacheHash() : bool
 - No cHash is set but there are query parameters, then calculate a possible cHash from the given query parameters and see if a cHash is returned (similar to comparing this).
 - evaluateQueryParametersWithoutCacheHash() : bool
 - No cHash is set but there are query parameters, check if that is correct
 - getRelevantParametersForCacheHashCalculation() : array<string, string>
 - Filters out the arguments that are necessary for calculating cHash
 
Methods
__construct()
    public
                    __construct(CacheHashCalculator $cacheHashCalculator, LoggerInterface $logger) : mixed
    Parameters
- $cacheHashCalculator : CacheHashCalculator
 - $logger : LoggerInterface
 
process()
Validates the &cHash parameter against the other $queryParameters / GET parameters
    public
                    process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 - $handler : RequestHandlerInterface
 
Return values
ResponseInterfaceevaluateCacheHashParameter()
Calculates a hash string based on additional parameters in the url.
    protected
                    evaluateCacheHashParameter(CacheInstruction $cacheInstruction, string $cHash, array<string, string> $relevantParameters, bool $pageNotFoundOnCacheHashError) : bool
    This is used to cache pages with more parameters than just id and type.
Parameters
- $cacheInstruction : CacheInstruction
 - $cHash : string
 - 
                    
the chash to check
 - $relevantParameters : array<string, string>
 - 
                    
GET parameters necessary for cHash calculation
 - $pageNotFoundOnCacheHashError : bool
 - 
                    
see $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError']
 
Return values
bool —if false, then a PageNotFound response is triggered
evaluatePageArgumentsWithoutCacheHash()
No cHash is set but there are query parameters, then calculate a possible cHash from the given query parameters and see if a cHash is returned (similar to comparing this).
    protected
                    evaluatePageArgumentsWithoutCacheHash(CacheInstruction $cacheInstruction, PageArguments $pageArguments, bool $pageNotFoundOnCacheHashError) : bool
    Is only called if NO cHash parameter is given.
Parameters
- $cacheInstruction : CacheInstruction
 - $pageArguments : PageArguments
 - $pageNotFoundOnCacheHashError : bool
 
Return values
boolevaluateQueryParametersWithoutCacheHash()
No cHash is set but there are query parameters, check if that is correct
    protected
                    evaluateQueryParametersWithoutCacheHash(CacheInstruction $cacheInstruction, array<string, string|array<string|int, mixed>> $dynamicArguments, bool $pageNotFoundOnCacheHashError) : bool
    Should only be called if NO cHash parameter is given.
Parameters
- $cacheInstruction : CacheInstruction
 - $dynamicArguments : array<string, string|array<string|int, mixed>>
 - $pageNotFoundOnCacheHashError : bool
 
Return values
boolgetRelevantParametersForCacheHashCalculation()
Filters out the arguments that are necessary for calculating cHash
    protected
                    getRelevantParametersForCacheHashCalculation(PageArguments $pageArguments) : array<string, string>
    Parameters
- $pageArguments : PageArguments