Development

Changeset 7777

You must first sign up to be able to contribute.

Changeset 7777

Show
Ignore:
Timestamp:
03/08/08 14:26:35 (7 months ago)
Author:
fabien
Message:

changed auto_shutdown default value to be true for all factories by default, added a load_configuration option to sfRouting, renamed cache key for routing to avoid conflicts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/config/sfFactoryConfigHandler.class.php

    r7631 r7777  
    172172 
    173173          $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           } 
    178174          break; 
    179175 
  • branches/1.1/lib/database/sfDatabaseManager.class.php

    r7614 r7777  
    3636    $this->initialize($configuration); 
    3737 
    38     if (isset($options['auto_shutdown']) && $options['auto_shutdown']) 
     38    if (!isset($options['auto_shutdown']) || $options['auto_shutdown']) 
    3939    { 
    4040      register_shutdown_function(array($this, 'shutdown')); 
  • branches/1.1/lib/log/sfLogger.class.php

    r6551 r7777  
    5050    $this->initialize($dispatcher, $options); 
    5151 
    52     if (isset($options['auto_shutdown']) && $options['auto_shutdown']) 
     52    if (!isset($options['auto_shutdown']) || $options['auto_shutdown']) 
    5353    { 
    5454      register_shutdown_function(array($this, 'shutdown')); 
  • branches/1.1/lib/routing/sfPatternRouting.class.php

    r7741 r7777  
    6363    $options['variable_content_regex']   = '[^'.implode('', array_map(create_function('$a', 'return str_replace(\'-\', \'\-\', preg_quote($a, \'#\'));'), $options['segment_separators'])).']+'; 
    6464 
     65    if (!isset($options['load_configuration'])) 
     66    { 
     67      $options['load_configuration'] = false; 
     68    } 
     69 
     70    $this->setDefaultSuffix(isset($options['suffix']) ? $options['suffix'] : ''); 
     71 
    6572    parent::initialize($dispatcher, $cache, $options); 
    6673 
    67     $this->setDefaultSuffix(isset($options['suffix']) ? $options['suffix'] : ''); 
    68  
    6974    if (!is_null($this->cache) && $cacheData = $this->cache->get('data')) 
    7075    { 
     
    8489    else 
    8590    { 
    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)) 
    8792      { 
    8893        include($config); 
     
    9398      if (!is_null($this->cache)) 
    9499      { 
    95         $this->cache->set('configuration', serialize($this->routes)); 
     100        $this->cache->set('symfony.routing.configuration', serialize($this->routes)); 
    96101      } 
    97102    } 
     
    686691    { 
    687692      $this->cacheChanged = false; 
    688       $this->cache->set('data', serialize($this->cacheData)); 
     693      $this->cache->set('symfony.routing.data', serialize($this->cacheData)); 
    689694    } 
    690695  } 
  • branches/1.1/lib/routing/sfRouting.class.php

    r7706 r7777  
    3636    $this->initialize($dispatcher, $cache, $options); 
    3737 
    38     if (isset($this->options['auto_shutdown']) && $this->options['auto_shutdown']) 
     38    if (!isset($this->options['auto_shutdown']) || $this->options['auto_shutdown']) 
    3939    { 
    4040      register_shutdown_function(array($this, 'shutdown')); 
     
    8484    $this->dispatcher->connect('user.change_culture', array($this, 'listenToChangeCultureEvent')); 
    8585    $this->dispatcher->connect('request.filter_parameters', array($this, 'filterParametersEvent')); 
     86 
     87    $this->loadConfiguration(); 
    8688  } 
    8789