Changeset 7777
- Timestamp:
- 03/08/08 14:26:35 (1 year ago)
- Files:
-
- branches/1.1/lib/config/sfFactoryConfigHandler.class.php (modified) (1 diff)
- branches/1.1/lib/database/sfDatabaseManager.class.php (modified) (1 diff)
- branches/1.1/lib/log/sfLogger.class.php (modified) (1 diff)
- branches/1.1/lib/routing/sfPatternRouting.class.php (modified) (4 diffs)
- branches/1.1/lib/routing/sfRouting.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/config/sfFactoryConfigHandler.class.php
r7631 r7777 172 172 173 173 $instances[] = sprintf(" \$class = sfConfig::get('sf_factory_routing', '%s');\n %s\n\$this->factories['routing'] = new \$class(\$this->dispatcher, \$cache, array_merge(array('auto_shutdown' => false), sfConfig::get('sf_factory_routing_parameters', %s)));", $class, $cache, var_export($parameters, true)); 174 if (isset($parameters['load_configuration']) && $parameters['load_configuration'])175 {176 $instances[] = " \$this->factories['routing']->loadConfiguration();\n";177 }178 174 break; 179 175 branches/1.1/lib/database/sfDatabaseManager.class.php
r7614 r7777 36 36 $this->initialize($configuration); 37 37 38 if ( isset($options['auto_shutdown']) &&$options['auto_shutdown'])38 if (!isset($options['auto_shutdown']) || $options['auto_shutdown']) 39 39 { 40 40 register_shutdown_function(array($this, 'shutdown')); branches/1.1/lib/log/sfLogger.class.php
r6551 r7777 50 50 $this->initialize($dispatcher, $options); 51 51 52 if ( isset($options['auto_shutdown']) &&$options['auto_shutdown'])52 if (!isset($options['auto_shutdown']) || $options['auto_shutdown']) 53 53 { 54 54 register_shutdown_function(array($this, 'shutdown')); branches/1.1/lib/routing/sfPatternRouting.class.php
r7741 r7777 63 63 $options['variable_content_regex'] = '[^'.implode('', array_map(create_function('$a', 'return str_replace(\'-\', \'\-\', preg_quote($a, \'#\'));'), $options['segment_separators'])).']+'; 64 64 65 if (!isset($options['load_configuration'])) 66 { 67 $options['load_configuration'] = false; 68 } 69 70 $this->setDefaultSuffix(isset($options['suffix']) ? $options['suffix'] : ''); 71 65 72 parent::initialize($dispatcher, $cache, $options); 66 73 67 $this->setDefaultSuffix(isset($options['suffix']) ? $options['suffix'] : '');68 69 74 if (!is_null($this->cache) && $cacheData = $this->cache->get('data')) 70 75 { … … 84 89 else 85 90 { 86 if ($ config = sfContext::getInstance()->getConfigCache()->checkConfig('config/routing.yml', true))91 if ($this->options['load_configuration'] && $config = sfContext::getInstance()->getConfigCache()->checkConfig('config/routing.yml', true)) 87 92 { 88 93 include($config); … … 93 98 if (!is_null($this->cache)) 94 99 { 95 $this->cache->set(' configuration', serialize($this->routes));100 $this->cache->set('symfony.routing.configuration', serialize($this->routes)); 96 101 } 97 102 } … … 686 691 { 687 692 $this->cacheChanged = false; 688 $this->cache->set(' data', serialize($this->cacheData));693 $this->cache->set('symfony.routing.data', serialize($this->cacheData)); 689 694 } 690 695 } branches/1.1/lib/routing/sfRouting.class.php
r7706 r7777 36 36 $this->initialize($dispatcher, $cache, $options); 37 37 38 if ( isset($this->options['auto_shutdown']) &&$this->options['auto_shutdown'])38 if (!isset($this->options['auto_shutdown']) || $this->options['auto_shutdown']) 39 39 { 40 40 register_shutdown_function(array($this, 'shutdown')); … … 84 84 $this->dispatcher->connect('user.change_culture', array($this, 'listenToChangeCultureEvent')); 85 85 $this->dispatcher->connect('request.filter_parameters', array($this, 'filterParametersEvent')); 86 87 $this->loadConfiguration(); 86 88 } 87 89

