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


PHP CacheManager::loadResource方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     $this->cachedPaths = CacheManager::loadResource(self::AUTO_LOAD_RESOURCE_NAME, CacheManager::APPLICATION_SCOPE);
     if ($this->cachedPaths == null) {
         $this->cachedPaths = array();
     }
     spl_autoload_register(array($this, "autoLoad"));
 }
开发者ID:picon,项目名称:picon-framework,代码行数:8,代码来源:AutoLoader.php

示例2: loadConfig

 /**
  * Load the application config
  * @return Config
  */
 protected function loadConfig()
 {
     $config = null;
     if (CacheManager::resourceExists(self::CONFIG_RESOURCE_NAME, CacheManager::APPLICATION_SCOPE)) {
         $config = CacheManager::loadResource(self::CONFIG_RESOURCE_NAME, CacheManager::APPLICATION_SCOPE);
     } else {
         $config = ConfigLoader::load(CONFIG_FILE);
         CacheManager::saveResource(self::CONFIG_RESOURCE_NAME, $config, CacheManager::APPLICATION_SCOPE);
     }
     PiconApplication::get()->getConfigLoadListener()->onConfigLoaded($config);
     return $config;
 }
开发者ID:picon,项目名称:picon-framework,代码行数:16,代码来源:BaseApplicationInitializer.php

示例3: load

 public function load(Config $config)
 {
     $this->resourceMap = CacheManager::loadResource(self::CONTEXT_RESOURCE_NAME, CacheManager::APPLICATION_SCOPE);
     if ($this->resourceMap == null) {
         ApplicationInitializer::loadAssets(ASSETS_DIRECTORY);
         $this->resourceMap = $this->loadResourceMap($this->getClasses());
         CacheManager::saveResource(self::CONTEXT_RESOURCE_NAME, $this->resourceMap, CacheManager::APPLICATION_SCOPE);
     }
     $this->createResources();
     $this->loadDataSources($config->getDataSources());
     return new ApplicationContext($this->resources);
 }
开发者ID:picon,项目名称:picon-framework,代码行数:12,代码来源:AbstractContextLoader.php

示例4: __construct

 private function __construct(Component $component)
 {
     $this->component = $component;
     $page = $component->getPage() == null ? "" : get_class($component->getPage());
     $resourceName = self::PROPERTIES_CACHE_NAME . '_' . $page . '_' . $component->getComponentPath();
     if (CacheManager::resourceExists($resourceName, CacheManager::APPLICATION_SCOPE)) {
         $this->properties = CacheManager::loadResource($resourceName, CacheManager::APPLICATION_SCOPE);
     } else {
         $this->properties = $this->getProperties($this->component);
         CacheManager::saveResource($resourceName, $this->properties, CacheManager::APPLICATION_SCOPE);
     }
 }
开发者ID:picon,项目名称:picon-framework,代码行数:12,代码来源:Localizer.php

示例5: loadMarkup

 /**
  * Load the associated markup file for a component
  * @param Component $component
  * @return MarkupElement The root markup tag, populated with child tags 
  */
 public function loadMarkup(Component $component)
 {
     $name = get_class($component);
     $fileSafeName = str_replace('\\', '_', $name);
     if (PiconApplication::get()->getProfile()->isCacheMarkup()) {
         if (CacheManager::resourceExists(self::MARKUP_RESOURCE_PREFIX . $fileSafeName, CacheManager::APPLICATION_SCOPE)) {
             return CacheManager::loadResource(self::MARKUP_RESOURCE_PREFIX . $fileSafeName, CacheManager::APPLICATION_SCOPE);
         } else {
             $markup = $this->internalLoadMarkup($name);
             CacheManager::saveResource(self::MARKUP_RESOURCE_PREFIX . $fileSafeName, $markup, CacheManager::APPLICATION_SCOPE);
             return $markup;
         }
     } else {
         return $this->internalLoadMarkup($name);
     }
 }
开发者ID:picon,项目名称:picon-framework,代码行数:21,代码来源:MarkupLoader.php

示例6: __wakeup

 public function __wakeup()
 {
     $this->pages = CacheManager::loadResource(self::PAGE_MAP_RESOURCE_NAME, CacheManager::APPLICATION_SCOPE);
     $this->mountedPages = CacheManager::loadResource(self::PAGE_MAP_MOUNTED_RESOURCE_NAME, CacheManager::APPLICATION_SCOPE);
 }
开发者ID:picon,项目名称:picon-framework,代码行数:5,代码来源:PageMap.php


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