当前位置: 首页>>代码示例>>PHP>>正文


PHP VariableFrontend::remove方法代码示例

本文整理汇总了PHP中TYPO3\Flow\Cache\Frontend\VariableFrontend::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP VariableFrontend::remove方法的具体用法?PHP VariableFrontend::remove怎么用?PHP VariableFrontend::remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\Flow\Cache\Frontend\VariableFrontend的用法示例。


在下文中一共展示了VariableFrontend::remove方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: validateAndClearAssertionSteps

 /**
  * Validate that all required assertion steps of a badge were completed and remove the stored assertion steps for all tokens
  *
  * @param BadgeClass $badgeClass
  * @param array $tokens
  * @return boolean
  */
 public function validateAndClearAssertionSteps(BadgeClass $badgeClass, array $tokens)
 {
     $completedAssertionSteps = array();
     foreach ($tokens as $token) {
         $assertionStep = $this->assertionStepStore->get($token);
         if ($assertionStep instanceof AssertionStep && $assertionStep->getBadgeClass() === $badgeClass) {
             $completedAssertionSteps[$assertionStep->getIdentifier()] = $assertionStep;
         }
     }
     foreach ($badgeClass->getAssertionSteps() as $stepIdentifier) {
         if (!isset($completedAssertionSteps[$stepIdentifier])) {
             return FALSE;
         }
     }
     foreach ($tokens as $token) {
         $this->assertionStepStore->remove($token);
     }
     return TRUE;
 }
开发者ID:christophlehmann,项目名称:Networkteam.OpenBadges,代码行数:26,代码来源:BadgeAsserter.php

示例2: build

 /**
  * Builds proxy class code which weaves advices into the respective target classes.
  *
  * The object configurations provided by the Compiler are searched for possible aspect
  * annotations. If an aspect class is found, the pointcut expressions are parsed and
  * a new aspect with one or more advisors is added to the aspect registry of the AOP framework.
  * Finally all advices are woven into their target classes by generating proxy classes.
  *
  * In general, the command typo3.flow:core:compile is responsible for compilation
  * and calls this method to do so.
  *
  * In order to distinguish between an emerged / changed possible target class and
  * a class which has been matched previously but just didn't have to be proxied,
  * the latter are kept track of by an "unproxiedClass-*" cache entry.
  *
  * @return void
  */
 public function build()
 {
     $allAvailableClassNamesByPackage = $this->objectManager->getRegisteredClassNames();
     $possibleTargetClassNames = $this->getProxyableClasses($allAvailableClassNamesByPackage);
     $actualAspectClassNames = $this->reflectionService->getClassNamesByAnnotation(Flow\Aspect::class);
     sort($possibleTargetClassNames);
     sort($actualAspectClassNames);
     $this->aspectContainers = $this->buildAspectContainers($actualAspectClassNames);
     $rebuildEverything = false;
     if ($this->objectConfigurationCache->has('allAspectClassesUpToDate') === false) {
         $rebuildEverything = true;
         $this->systemLogger->log('Aspects have been modified, therefore rebuilding all target classes.', LOG_INFO);
         $this->objectConfigurationCache->set('allAspectClassesUpToDate', true);
     }
     $possibleTargetClassNameIndex = new ClassNameIndex();
     $possibleTargetClassNameIndex->setClassNames($possibleTargetClassNames);
     $targetClassNameCandidates = new ClassNameIndex();
     foreach ($this->aspectContainers as $aspectContainer) {
         $targetClassNameCandidates->applyUnion($aspectContainer->reduceTargetClassNames($possibleTargetClassNameIndex));
     }
     $targetClassNameCandidates->sort();
     $treatedSubClasses = new ClassNameIndex();
     foreach ($targetClassNameCandidates->getClassNames() as $targetClassName) {
         $isUnproxied = $this->objectConfigurationCache->has('unproxiedClass-' . str_replace('\\', '_', $targetClassName));
         $hasCacheEntry = $this->compiler->hasCacheEntryForClass($targetClassName) || $isUnproxied;
         if ($rebuildEverything === true || $hasCacheEntry === false) {
             $proxyBuildResult = $this->buildProxyClass($targetClassName, $this->aspectContainers);
             if ($proxyBuildResult === false) {
                 // In case the proxy was not build because there was nothing adviced,
                 // it might be an advice in the parent and so we need to try to treat this class.
                 $treatedSubClasses = $this->addBuildMethodsAndAdvicesCodeToClass($targetClassName, $treatedSubClasses);
             }
             $treatedSubClasses = $this->proxySubClassesOfClassToEnsureAdvices($targetClassName, $targetClassNameCandidates, $treatedSubClasses);
             if ($proxyBuildResult !== false) {
                 if ($isUnproxied) {
                     $this->objectConfigurationCache->remove('unproxiedClass-' . str_replace('\\', '_', $targetClassName));
                 }
                 $this->systemLogger->log(sprintf('Built AOP proxy for class "%s".', $targetClassName), LOG_DEBUG);
             } else {
                 $this->objectConfigurationCache->set('unproxiedClass-' . str_replace('\\', '_', $targetClassName), true);
             }
         }
     }
 }
开发者ID:RafaelKa,项目名称:flow-development-collection,代码行数:61,代码来源:ProxyClassBuilder.php

示例3: build

 /**
  * Builds proxy class code which weaves advices into the respective target classes.
  *
  * The object configurations provided by the Compiler are searched for possible aspect
  * annotations. If an aspect class is found, the pointcut expressions are parsed and
  * a new aspect with one or more advisors is added to the aspect registry of the AOP framework.
  * Finally all advices are woven into their target classes by generating proxy classes.
  *
  * In general, the command typo3.flow:core:compile is responsible for compilation
  * and calls this method to do so.
  *
  * In order to distinguish between an emerged / changed possible target class and
  * a class which has been matched previously but just didn't have to be proxied,
  * the latter are kept track of by an "unproxiedClass-*" cache entry.
  *
  * @return void
  */
 public function build()
 {
     $allAvailableClassNamesByPackage = $this->objectManager->getRegisteredClassNames();
     $possibleTargetClassNames = $this->getProxyableClasses($allAvailableClassNamesByPackage);
     $actualAspectClassNames = $this->reflectionService->getClassNamesByAnnotation('TYPO3\\Flow\\Annotations\\Aspect');
     sort($possibleTargetClassNames);
     sort($actualAspectClassNames);
     $this->aspectContainers = $this->buildAspectContainers($actualAspectClassNames);
     $rebuildEverything = FALSE;
     if ($this->objectConfigurationCache->has('allAspectClassesUpToDate') === FALSE) {
         $rebuildEverything = TRUE;
         $this->systemLogger->log('Aspects have been modified, therefore rebuilding all target classes.', LOG_INFO);
         $this->objectConfigurationCache->set('allAspectClassesUpToDate', TRUE);
     }
     $possibleTargetClassNameIndex = new ClassNameIndex();
     $possibleTargetClassNameIndex->setClassNames($possibleTargetClassNames);
     $targetClassNameCandidates = new ClassNameIndex();
     foreach ($this->aspectContainers as $aspectContainer) {
         $targetClassNameCandidates->applyUnion($aspectContainer->reduceTargetClassNames($possibleTargetClassNameIndex));
     }
     $targetClassNameCandidates->sort();
     foreach ($targetClassNameCandidates->getClassNames() as $targetClassName) {
         $isUnproxied = $this->objectConfigurationCache->has('unproxiedClass-' . str_replace('\\', '_', $targetClassName));
         $hasCacheEntry = $this->compiler->hasCacheEntryForClass($targetClassName) || $isUnproxied;
         if ($rebuildEverything === TRUE || $hasCacheEntry === FALSE) {
             $proxyBuildResult = $this->buildProxyClass($targetClassName, $this->aspectContainers);
             if ($proxyBuildResult !== FALSE) {
                 if ($isUnproxied) {
                     $this->objectConfigurationCache->remove('unproxiedClass-' . str_replace('\\', '_', $targetClassName));
                 }
                 $this->systemLogger->log(sprintf('Built AOP proxy for class "%s".', $targetClassName), LOG_DEBUG);
             } else {
                 $this->objectConfigurationCache->set('unproxiedClass-' . str_replace('\\', '_', $targetClassName), TRUE);
             }
         }
     }
 }
开发者ID:sengkimlong,项目名称:Flow3-Authentification,代码行数:54,代码来源:ProxyClassBuilder.php

示例4: removeSessionMetaDataCacheEntry

 /**
  * Removes the session info cache entry for the specified session.
  *
  * Note that this function does only remove the "head" cache entry, not the
  * related data referred to by the storage identifier.
  *
  * @param string $sessionIdentifier
  * @return void
  */
 protected function removeSessionMetaDataCacheEntry($sessionIdentifier)
 {
     $this->metaDataCache->remove($sessionIdentifier);
 }
开发者ID:cerlestes,项目名称:flow-development-collection,代码行数:13,代码来源:Session.php

示例5: unsetItem

 /**
  * @param string $cacheKey
  */
 protected function unsetItem($cacheKey)
 {
     unset($this->objectCache[$cacheKey]);
     $this->apiCache->remove($cacheKey);
 }
开发者ID:neos,项目名称:Neos.NeosIo,代码行数:8,代码来源:AbstractApiConnector.php

示例6: reset

 /**
  * Resets the PolicyService to behave transparently during
  * functional testing.
  *
  * @return void
  */
 public function reset()
 {
     $this->initializedRoles = FALSE;
     $this->cache->remove('rolesFromPolicyUpToDate');
 }
开发者ID:sokunthearith,项目名称:Intern-Project-Week-2,代码行数:11,代码来源:PolicyService.php


注:本文中的TYPO3\Flow\Cache\Frontend\VariableFrontend::remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。