コード例 #1
0
ファイル: PointcutFilter.php プロジェクト: nxpthx/FLOW3
 /**
  * This method is used to optimize the matching process.
  *
  * @param \TYPO3\FLOW3\Aop\Builder\ClassNameIndex $classNameIndex
  * @return \TYPO3\FLOW3\Aop\Builder\ClassNameIndex
  */
 public function reduceTargetClassNames(\TYPO3\FLOW3\Aop\Builder\ClassNameIndex $classNameIndex)
 {
     if ($this->pointcut === NULL) {
         $this->pointcut = $this->proxyClassBuilder->findPointcut($this->aspectClassName, $this->pointcutMethodName);
     }
     if ($this->pointcut === FALSE) {
         return $classNameIndex;
     }
     return $this->pointcut->reduceTargetClassNames($classNameIndex);
 }
コード例 #2
0
 /**
  * Explicitly compile proxy classes
  *
  * The compile command triggers the proxy class compilation.
  * Although a compilation run is triggered automatically by FLOW3, there might
  * be cases in a production context where a manual compile run is needed.
  *
  * @FLOW3\Internal
  * @param boolean $force If set, classes will be compiled even though the cache says that everything is up to date.
  * @return void
  */
 public function compileCommand($force = FALSE)
 {
     $objectConfigurationCache = $this->cacheManager->getCache('FLOW3_Object_Configuration');
     if ($force === FALSE) {
         if ($objectConfigurationCache->has('allCompiledCodeUpToDate')) {
             return;
         }
     }
     $classesCache = $this->cacheManager->getCache('FLOW3_Object_Classes');
     $this->proxyClassCompiler->injectClassesCache($classesCache);
     $this->aopProxyClassBuilder->injectObjectConfigurationCache($objectConfigurationCache);
     $this->aopProxyClassBuilder->build();
     $this->dependencyInjectionProxyClassBuilder->build();
     $classCount = $this->proxyClassCompiler->compile();
     $objectConfigurationCache->set('allCompiledCodeUpToDate', TRUE);
     $classesCacheBackend = $classesCache->getBackend();
     if ($this->bootstrap->getContext()->isProduction() && $classesCacheBackend instanceof FreezableBackendInterface) {
         $classesCache->getBackend()->freeze();
     }
     $this->emitFinishedCompilationRun($classCount);
 }