コード例 #1
0
 /**
  * Checks which classes lack a cache entry and removes their reflection data
  * accordingly.
  *
  * @return void
  * @author Robert Lemke <*****@*****.**>
  */
 protected function forgetChangedClasses()
 {
     foreach (array_keys($this->reflectedClassNames) as $className) {
         if (!$this->statusCache->has(str_replace('\\', '_', $className))) {
             $this->forgetClass($className);
         }
     }
 }
コード例 #2
0
 /**
  * Prepares a mirror of public package resources that is accessible through
  * the web server directly.
  *
  * @param array $activePackages
  * @return void
  * @author Karsten Dambekalns <*****@*****.**>
  */
 public function publishPublicPackageResources(array $activePackages)
 {
     if ($this->settings['resource']['publishing']['detectPackageResourceChanges'] === FALSE && $this->statusCache->has('packageResourcesPublished')) {
         return;
     }
     foreach ($activePackages as $packageKey => $package) {
         $this->resourcePublisher->publishStaticResources($package->getResourcesPath() . 'Public/', 'Packages/' . $packageKey . '/');
     }
     if (!$this->statusCache->has('packageResourcesPublished')) {
         $this->statusCache->set('packageResourcesPublished', 'y', array(\F3\FLOW3\Cache\Frontend\FrontendInterface::TAG_PACKAGE));
     }
 }
コード例 #3
0
 /**
  * Around advice
  *
  * @around method(F3\FLOW3\MVC\Web\Routing\Router->resolve())
  * @param F3\FLOW3\AOP\JoinPointInterface $joinPoint The current join point
  * @return string Result of the target method
  * @author Bastian Waidelich <*****@*****.**>
  * @author Karsten Dambekalns <*****@*****.**>
  */
 public function cacheResolveCall(\F3\FLOW3\AOP\JoinPointInterface $joinPoint)
 {
     $routeValues = $joinPoint->getMethodArgument('routeValues');
     $routeValues = $this->convertObjectsToHashes($routeValues);
     \F3\FLOW3\Utility\Arrays::sortKeysRecursively($routeValues);
     $cacheIdentifier = md5(http_build_query($routeValues));
     if ($this->resolveCache->has($cacheIdentifier)) {
         return $this->resolveCache->get($cacheIdentifier);
     }
     $matchingUri = $joinPoint->getAdviceChain()->proceed($joinPoint);
     if ($matchingUri !== '') {
         $this->resolveCache->set($cacheIdentifier, $matchingUri);
     }
     return $matchingUri;
 }