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


PHP sfRouting::loadConfiguration方法代码示例

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


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

示例1: loadConfiguration

 /**
  * @see sfRouting
  */
 public function loadConfiguration()
 {
     if ($this->options['load_configuration'] && ($config = $this->getConfigFilename())) {
         include $config;
     }
     parent::loadConfiguration();
 }
开发者ID:sensorsix,项目名称:app,代码行数:10,代码来源:sfPatternRouting.class.php

示例2: loadConfiguration

 /**
  * @see sfRouting
  */
 public function loadConfiguration()
 {
     if (!is_null($this->cache) && ($routes = $this->cache->get('symfony.routing.configuration'))) {
         $this->routes = unserialize($routes);
         $this->routesFullyLoaded = false;
     } else {
         if ($this->options['load_configuration'] && ($config = sfContext::getInstance()->getConfigCache()->checkConfig('config/routing.yml', true))) {
             $this->setRoutes(include $config);
         }
         parent::loadConfiguration();
         if (!is_null($this->cache)) {
             if (!$this->options['lazy_routes_deserialize']) {
                 $this->cache->set('symfony.routing.configuration', serialize($this->routes));
             } else {
                 $lazyMap = array();
                 foreach ($this->routes as $name => $route) {
                     if (is_string($route)) {
                         $route = $this->loadRoute($name);
                     }
                     $lazyMap[$name] = serialize($route);
                 }
                 $this->cache->set('symfony.routing.configuration', serialize($lazyMap));
             }
         }
     }
 }
开发者ID:yasirgit,项目名称:afids,代码行数:29,代码来源:sfPatternRouting.class.php

示例3: loadConfiguration

 /**
  * @see sfRouting
  */
 public function loadConfiguration()
 {
     if ($this->options['load_configuration'] && ($config = sfContext::getInstance()->getConfigCache()->checkConfig('config/routing.yml', true))) {
         foreach (include $config as $name => $route) {
             $this->routes[$name] = $route;
         }
     }
     parent::loadConfiguration();
 }
开发者ID:bigcalm,项目名称:urlcatcher,代码行数:12,代码来源:sfPatternRouting.class.php

示例4: loadConfiguration

 /**
  * @see sfRouting
  */
 public function loadConfiguration()
 {
     if (!is_null($this->cache) && ($routes = $this->cache->get('symfony.routing.configuration'))) {
         $this->routes = unserialize($routes);
     } else {
         if ($this->options['load_configuration'] && ($config = sfContext::getInstance()->getConfigCache()->checkConfig('config/routing.yml', true))) {
             $this->setRoutes(include $config);
         }
         parent::loadConfiguration();
         if (!is_null($this->cache)) {
             $this->cache->set('symfony.routing.configuration', serialize($this->routes));
         }
     }
 }
开发者ID:WIZARDISHUNGRY,项目名称:symfony,代码行数:17,代码来源:sfPatternRouting.class.php


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