Changeset 7626
- Timestamp:
- 02/27/08 13:32:43 (8 months ago)
- Files:
-
- branches/1.1/lib/config/config/factories.yml (modified) (2 diffs)
- branches/1.1/lib/config/sfFactoryConfigHandler.class.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/config/config/factories.yml
r7616 r7626 8 8 response: 9 9 class: sfWebResponse 10 param: 11 logging: %SF_LOGGING_ENABLED% 12 charset: %SF_CHARSET% 10 13 11 14 user: 12 15 class: myUser 13 16 param: 14 timeout: 1800 17 timeout: 1800 18 logging: %SF_LOGGING_ENABLED% 19 use_flash: %SF_USE_FLASH% 20 default_culture: %SF_DEFAULT_CULTURE% 15 21 16 22 storage: … … 49 55 default_module: default 50 56 default_action: index 57 logging: %SF_LOGGING_ENABLED% 51 58 cache: 52 59 class: sfFileCache branches/1.1/lib/config/sfFactoryConfigHandler.class.php
r7616 r7626 106 106 107 107 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()'); 111 109 $instances[] = sprintf(" if ('HEAD' == \$this->factories['request']->getMethodName())\n { \n \$this->factories['response']->setHeaderOnly(true);\n }\n"); 112 110 break; … … 125 123 126 124 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)); 128 126 break; 129 127 … … 172 170 } 173 171 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)); 175 173 if (isset($parameters['load_configuration']) && $parameters['load_configuration']) 176 174 {