PHP Class Neos\Flow\Mvc\Routing\RouterCachingService

Mostra file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$resolveCache Neos\Cache\Frontend\StringFrontend
$routeCache Neos\Cache\Frontend\VariableFrontend
$routingSettings array
$systemLogger Neos\Flow\Log\SystemLoggerInterface

Public Methods

Method Description
flushCaches ( ) : void Flushes 'route' and 'resolve' caches.
flushCachesByTag ( string $tag ) : void Flushes 'findMatchResults' and 'resolve' caches for the given $tag
flushCachesForUriPath ( string $uriPath ) : void Flushes 'findMatchResults' caches that are tagged with the given $uriPath
getCachedMatchResults ( Request $httpRequest ) : array | boolean Checks the cache for the route path given in the Request and returns the result
getCachedResolvedUriPath ( array $routeValues ) : string | boolean Checks the cache for the given route values and returns the cached resolvedUriPath if a cache entry is found
initializeObject ( ) : void
storeMatchResults ( Request $httpRequest, array $matchResults ) : void Stores the $matchResults in the cache
storeResolvedUriPath ( string $uriPath, array $routeValues ) : void Stores the $uriPath in the cache together with the $routeValues

Protected Methods

Method Description
buildResolveCacheIdentifier ( array $routeValues ) : string Generates the Resolve cache identifier for the given Request
buildRouteCacheIdentifier ( Request $httpRequest ) : string Generates the Matching cache identifier for the given Request
containsObject ( mixed $subject ) : boolean Checks if the given subject contains an object
convertObjectsToHashes ( array $routeValues ) : array Recursively converts objects in an array to their identifiers
extractUuids ( array $values ) : array Helper method to generate tags by taking all UUIDs contained in the given $routeValues or $matchResults
generateRouteTags ( string $uriPath, array $routeValues ) : array

Method Details

buildResolveCacheIdentifier() protected method

Generates the Resolve cache identifier for the given Request
protected buildResolveCacheIdentifier ( array $routeValues ) : string
$routeValues array
return string

buildRouteCacheIdentifier() protected method

Generates the Matching cache identifier for the given Request
protected buildRouteCacheIdentifier ( Request $httpRequest ) : string
$httpRequest Neos\Flow\Http\Request
return string

containsObject() protected method

Checks if the given subject contains an object
protected containsObject ( mixed $subject ) : boolean
$subject mixed
return boolean TRUE if $subject contains an object, otherwise FALSE

convertObjectsToHashes() protected method

Recursively converts objects in an array to their identifiers
protected convertObjectsToHashes ( array $routeValues ) : array
$routeValues array the array to be processed
return array the modified array or NULL if $routeValues contain an object and its identifier could not be determined

extractUuids() protected method

Helper method to generate tags by taking all UUIDs contained in the given $routeValues or $matchResults
protected extractUuids ( array $values ) : array
$values array
return array

flushCaches() public method

Flushes 'route' and 'resolve' caches.
public flushCaches ( ) : void
return void

flushCachesByTag() public method

Flushes 'findMatchResults' and 'resolve' caches for the given $tag
public flushCachesByTag ( string $tag ) : void
$tag string
return void

flushCachesForUriPath() public method

Flushes 'findMatchResults' caches that are tagged with the given $uriPath
public flushCachesForUriPath ( string $uriPath ) : void
$uriPath string
return void

generateRouteTags() protected method

protected generateRouteTags ( string $uriPath, array $routeValues ) : array
$uriPath string
$routeValues array
return array

getCachedMatchResults() public method

Checks the cache for the route path given in the Request and returns the result
public getCachedMatchResults ( Request $httpRequest ) : array | boolean
$httpRequest Neos\Flow\Http\Request
return array | boolean the cached route values or FALSE if no cache entry was found

getCachedResolvedUriPath() public method

Checks the cache for the given route values and returns the cached resolvedUriPath if a cache entry is found
public getCachedResolvedUriPath ( array $routeValues ) : string | boolean
$routeValues array
return string | boolean the cached request path or FALSE if no cache entry was found

initializeObject() public method

public initializeObject ( ) : void
return void

storeMatchResults() public method

Stores the $matchResults in the cache
public storeMatchResults ( Request $httpRequest, array $matchResults ) : void
$httpRequest Neos\Flow\Http\Request
$matchResults array
return void

storeResolvedUriPath() public method

Stores the $uriPath in the cache together with the $routeValues
public storeResolvedUriPath ( string $uriPath, array $routeValues ) : void
$uriPath string
$routeValues array
return void

Property Details

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
return Neos\Flow\ObjectManagement\ObjectManagerInterface

$persistenceManager protected_oe property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
return Neos\Flow\Persistence\PersistenceManagerInterface

$resolveCache protected_oe property

protected StringFrontend,Neos\Cache\Frontend $resolveCache
return Neos\Cache\Frontend\StringFrontend

$routeCache protected_oe property

protected VariableFrontend,Neos\Cache\Frontend $routeCache
return Neos\Cache\Frontend\VariableFrontend

$routingSettings protected_oe property

protected array $routingSettings
return array

$systemLogger protected_oe property

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
return Neos\Flow\Log\SystemLoggerInterface