本文整理汇总了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();
}
示例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));
}
}
}
}
示例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();
}
示例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));
}
}
}