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


PHP CacheProvider::getNamespace方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  *
  * @param CacheProvider $cache
  */
 public function __construct(CacheProvider $cache = null)
 {
     $this->cache = $cache;
     if ($this->cache !== null && $this->cache->getNamespace() === '') {
         $this->cache->setNamespace(self::CACHE_NAMESPACE);
     }
 }
开发者ID:ashutosh-srijan,项目名称:findit_akeneo,代码行数:12,代码来源:AclAnnotationProvider.php

示例2: __construct

 /**
  * @param ConfigProvider     $securityConfigProvider
  * @param ConfigProvider     $entityConfigProvider
  * @param CacheProvider|null $cache
  */
 public function __construct(ConfigProvider $securityConfigProvider, ConfigProvider $entityConfigProvider, CacheProvider $cache = null)
 {
     $this->securityConfigProvider = $securityConfigProvider;
     $this->entityConfigProvider = $entityConfigProvider;
     $this->cache = $cache;
     if ($this->cache !== null && $this->cache->getNamespace() === '') {
         $this->cache->setNamespace(self::CACHE_NAMESPACE);
     }
 }
开发者ID:ashutosh-srijan,项目名称:findit_akeneo,代码行数:14,代码来源:EntitySecurityMetadataProvider.php

示例3: __construct

 /**
  * Constructor
  *
  * @param array $owningEntityNames
  * @param ConfigProvider $configProvider
  * @param EntityClassResolver $entityClassResolver
  * @param CacheProvider|null $cache
  *
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
 public function __construct(array $owningEntityNames, ConfigProvider $configProvider, EntityClassResolver $entityClassResolver = null, CacheProvider $cache = null)
 {
     $this->organizationClass = $entityClassResolver === null ? $owningEntityNames['organization'] : $entityClassResolver->getEntityClass($owningEntityNames['organization']);
     $this->businessUnitClass = $entityClassResolver === null ? $owningEntityNames['business_unit'] : $entityClassResolver->getEntityClass($owningEntityNames['business_unit']);
     $this->userClass = $entityClassResolver === null ? $owningEntityNames['user'] : $entityClassResolver->getEntityClass($owningEntityNames['user']);
     $this->configProvider = $configProvider;
     $this->cache = $cache;
     if ($this->cache !== null && $this->cache->getNamespace() === '') {
         $this->cache->setNamespace(self::CACHE_NAMESPACE);
     }
     $this->noOwnershipMetadata = new OwnershipMetadata();
 }
开发者ID:ashutosh-srijan,项目名称:findit_akeneo,代码行数:22,代码来源:OwnershipMetadataProvider.php

示例4: clearCacheDriver

 protected function clearCacheDriver(CacheProvider $cacheDriver = null, $description = "")
 {
     if ($cacheDriver !== null) {
         $this->output .= 'Doctrine ' . $description . ' cache: ' . $cacheDriver->getNamespace() . ' — ';
         $this->output .= $cacheDriver->deleteAll() ? '<info>OK</info>' : '<info>FAIL</info>';
         $this->output .= PHP_EOL;
     }
 }
开发者ID:QuangDang212,项目名称:roadiz,代码行数:8,代码来源:DoctrineCacheClearer.php

示例5: __construct

 public function __construct(\Doctrine\Common\Cache\CacheProvider $engine, $ttl = 3600, $prefix = null)
 {
     $this->time = time();
     $this->serializer = new \Zumba\Util\JsonSerializer();
     $this->engine = $engine;
     $this->default_ttl = $ttl;
     if (!$prefix) {
         $prefix = $engine->getNamespace();
     }
     $this->prefix = $prefix;
     $this->auto_flush = true;
 }
开发者ID:symforce,项目名称:symforce-core,代码行数:12,代码来源:Cache.php

示例6: setCacheProvider

 /**
  * @param CacheProvider $cacheProvider
  */
 public function setCacheProvider($cacheProvider)
 {
     $namespace = '[<>]' . rtrim($this->getName() . '|' . $cacheProvider->getNamespace(), '|') . '[<>]';
     $arrayCache = new ArrayCache();
     $cacheChain = new ChainCache([$arrayCache, $cacheProvider]);
     $cacheProvider = new Wrapper($cacheChain);
     $cacheProvider->setNamespace($namespace);
     $this->cacheProvider = $cacheProvider;
     $this->readConnection->setCacheProvider($cacheProvider);
     if ($this->writeConnection) {
         $this->writeConnection->setCacheProvider($cacheProvider);
     }
 }
开发者ID:nhagemann,项目名称:anycontent-client-php,代码行数:16,代码来源:CachingRepository.php

示例7: getNamespace

 /**
  * {@inheritdoc}
  */
 public function getNamespace()
 {
     return $this->provider->getNamespace();
 }
开发者ID:jacobjjc,项目名称:PageKit-framework,代码行数:7,代码来源:Cache.php


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