Development

Changeset 7626

You must first sign up to be able to contribute.

Changeset 7626

Show
Ignore:
Timestamp:
02/27/08 13:32:43 (8 months ago)
Author:
fabien
Message:

moved sfConfig vars from sfFactoryConfigHandler to factories.yml

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/config/config/factories.yml

    r7616 r7626  
    88  response: 
    99    class: sfWebResponse 
     10    param: 
     11      logging: %SF_LOGGING_ENABLED% 
     12      charset: %SF_CHARSET% 
    1013 
    1114  user: 
    1215    class: myUser 
    1316    param: 
    14       timeout:  1800 
     17      timeout:         1800 
     18      logging:         %SF_LOGGING_ENABLED% 
     19      use_flash:       %SF_USE_FLASH% 
     20      default_culture: %SF_DEFAULT_CULTURE% 
    1521 
    1622  storage: 
     
    4955      default_module:     default 
    5056      default_action:     index 
     57      logging:            %SF_LOGGING_ENABLED% 
    5158      cache: 
    5259        class: sfFileCache 
  • branches/1.1/lib/config/sfFactoryConfigHandler.class.php

    r7616 r7626  
    106106 
    107107        case 'response': 
    108           $parameters = array_merge(array('charset' => sfConfig::get('sf_charset'), 'logging' => sfConfig::get('sf_logging_enabled')), is_array($parameters) ? $parameters : array()); 
    109           $instances[] = sprintf("  \$class = sfConfig::get('sf_factory_response', '%s');\n  \$this->factories['response'] = new \$class(\$this->dispatcher, sfConfig::get('sf_factory_response_parameters', %s));", $class, var_export($parameters, true)); 
    110  
     108          $instances[] = sprintf("  \$class = sfConfig::get('sf_factory_response', '%s');\n  \$this->factories['response'] = new \$class(\$this->dispatcher, sfConfig::get('sf_factory_response_parameters', %s));", $class, is_array($parameters) ? var_export($parameters, true) : 'array()'); 
    111109          $instances[] = sprintf("  if ('HEAD' == \$this->factories['request']->getMethodName())\n  {  \n    \$this->factories['response']->setHeaderOnly(true);\n  }\n"); 
    112110          break; 
     
    125123 
    126124        case 'user': 
    127           $instances[] = sprintf("  \$class = sfConfig::get('sf_factory_user', '%s');\n  \$this->factories['user'] = new \$class(\$this->dispatcher, \$this->factories['storage'], array_merge(array('auto_shutdown' => false, 'culture' => \$this->factories['request']->getParameter('sf_culture'), 'default_culture' => sfConfig::get('sf_default_culture', 'en'), 'use_flash' => sfConfig::get('sf_use_flash'), 'logging' => sfConfig::get('sf_logging_enabled')), sfConfig::get('sf_factory_user_parameters', %s)));", $class, var_export(is_array($parameters) ? $parameters : array(), true)); 
     125          $instances[] = sprintf("  \$class = sfConfig::get('sf_factory_user', '%s');\n  \$this->factories['user'] = new \$class(\$this->dispatcher, \$this->factories['storage'], array_merge(array('auto_shutdown' => false, 'culture' => \$this->factories['request']->getParameter('sf_culture')), sfConfig::get('sf_factory_user_parameters', %s)));", $class, var_export(is_array($parameters) ? $parameters : array(), true)); 
    128126          break; 
    129127 
     
    172170          } 
    173171 
    174           $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, 'logging' => sfConfig::get('sf_logging_enabled')), sfConfig::get('sf_factory_routing_parameters', %s)));", $class, $cache, var_export(is_array($parameters) ? $parameters : array(), true)); 
     172          $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(is_array($parameters) ? $parameters : array(), true)); 
    175173          if (isset($parameters['load_configuration']) && $parameters['load_configuration']) 
    176174          {