Neos\Flow\Mvc\Routing\RouterCachingService::getCachedResolvedUriPath PHP Method

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
    public function getCachedResolvedUriPath(array $routeValues)
    {
        $routeValues = $this->convertObjectsToHashes($routeValues);
        if ($routeValues === null) {
            return false;
        }
        return $this->resolveCache->get($this->buildResolveCacheIdentifier($routeValues));
    }

Usage Example

コード例 #1
0
 /**
  * @test
  */
 public function getCachedResolvedUriPathSkipsCacheIfRouteValuesContainObjectsThatCantBeConvertedToHashes()
 {
     $mockObject = new \stdClass();
     $routeValues = ['b' => 'route values', 'someObject' => $mockObject];
     $this->mockPersistenceManager->expects($this->once())->method('getIdentifierByObject')->with($mockObject)->will($this->returnValue(null));
     $this->mockResolveCache->expects($this->never())->method('has');
     $this->mockResolveCache->expects($this->never())->method('set');
     $this->routerCachingService->getCachedResolvedUriPath($routeValues);
 }
All Usage Examples Of Neos\Flow\Mvc\Routing\RouterCachingService::getCachedResolvedUriPath