1 <?php |
|
2 // auto-generated by sfFactoryConfigHandler |
|
3 // date: 2009/09/16 12:26:18 |
|
4 |
|
5 $class = sfConfig::get('sf_factory_logger', 'sfAggregateLogger'); |
|
6 $this->factories['logger'] = new $class($this->dispatcher, array_merge(array('auto_shutdown' => false), sfConfig::get('sf_factory_logger_parameters', array ( |
|
7 'level' => 'debug', |
|
8 )))); |
|
9 |
|
10 $logger = new sfWebDebugLogger($this->dispatcher, array_merge(array('auto_shutdown' => false), array ( |
|
11 'level' => 'debug', |
|
12 'xdebug_logging' => true, |
|
13 'web_debug_class' => 'sfWebDebug', |
|
14 ))); |
|
15 $this->factories['logger']->addLogger($logger); |
|
16 |
|
17 $logger = new sfFileLogger($this->dispatcher, array_merge(array('auto_shutdown' => false), array ( |
|
18 'level' => 'debug', |
|
19 'file' => '/Users/gautierthibault/Sites/thd/log/frontend_dev.log', |
|
20 ))); |
|
21 $this->factories['logger']->addLogger($logger); |
|
22 |
|
23 |
|
24 if (sfConfig::get('sf_i18n')) |
|
25 { |
|
26 $class = sfConfig::get('sf_factory_i18n', 'sfI18N'); |
|
27 $cache = new sfFileCache(array ( |
|
28 'automatic_cleaning_factor' => 0, |
|
29 'cache_dir' => '/Users/gautierthibault/Sites/thd/cache/frontend/dev/i18n', |
|
30 'lifetime' => 31556926, |
|
31 'prefix' => '/Users/gautierthibault/Sites/thd/apps/frontend/i18n', |
|
32 )); |
|
33 $this->factories['i18n'] = new $class($this->configuration, $cache, array ( |
|
34 'source' => 'XLIFF', |
|
35 'debug' => false, |
|
36 'untranslated_prefix' => '[T]', |
|
37 'untranslated_suffix' => '[/T]', |
|
38 )); |
|
39 sfWidgetFormSchemaFormatter::setTranslationCallable(array($this->factories['i18n'], '__')); |
|
40 } |
|
41 |
|
42 $class = sfConfig::get('sf_factory_controller', 'sfFrontWebController'); |
|
43 $this->factories['controller'] = new $class($this); |
|
44 $class = sfConfig::get('sf_factory_request', 'sfWebRequest'); |
|
45 $this->factories['request'] = new $class($this->dispatcher, array(), array(), sfConfig::get('sf_factory_request_parameters', array ( |
|
46 'logging' => '1', |
|
47 'path_info_array' => 'SERVER', |
|
48 'path_info_key' => 'PATH_INFO', |
|
49 'relative_url_root' => NULL, |
|
50 'formats' => |
|
51 array ( |
|
52 'txt' => 'text/plain', |
|
53 'js' => |
|
54 array ( |
|
55 0 => 'application/javascript', |
|
56 1 => 'application/x-javascript', |
|
57 2 => 'text/javascript', |
|
58 ), |
|
59 'css' => 'text/css', |
|
60 'json' => |
|
61 array ( |
|
62 0 => 'application/json', |
|
63 1 => 'application/x-json', |
|
64 ), |
|
65 'xml' => |
|
66 array ( |
|
67 0 => 'text/xml', |
|
68 1 => 'application/xml', |
|
69 2 => 'application/x-xml', |
|
70 ), |
|
71 'rdf' => 'application/rdf+xml', |
|
72 'atom' => 'application/atom+xml', |
|
73 ), |
|
74 'no_script_name' => false, |
|
75 )), sfConfig::get('sf_factory_request_attributes', array())); |
|
76 $class = sfConfig::get('sf_factory_response', 'sfWebResponse'); |
|
77 $this->factories['response'] = new $class($this->dispatcher, sfConfig::get('sf_factory_response_parameters', array_merge(array('http_protocol' => isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : null), array ( |
|
78 'logging' => '1', |
|
79 'charset' => 'utf-8', |
|
80 'send_http_headers' => true, |
|
81 )))); |
|
82 if ($this->factories['request'] instanceof sfWebRequest |
|
83 && $this->factories['response'] instanceof sfWebResponse |
|
84 && 'HEAD' == $this->factories['request']->getMethod()) |
|
85 { |
|
86 $this->factories['response']->setHeaderOnly(true); |
|
87 } |
|
88 |
|
89 $class = sfConfig::get('sf_factory_routing', 'sfPatternRouting'); |
|
90 $cache = new sfFileCache(array ( |
|
91 'automatic_cleaning_factor' => 0, |
|
92 'cache_dir' => '/Users/gautierthibault/Sites/thd/cache/frontend/dev/config/routing', |
|
93 'lifetime' => 31556926, |
|
94 'prefix' => '/Users/gautierthibault/Sites/thd/apps/frontend/routing', |
|
95 )); |
|
96 |
|
97 $this->factories['routing'] = new $class($this->dispatcher, $cache, array_merge(array('auto_shutdown' => false, 'context' => $this->factories['request']->getRequestContext()), sfConfig::get('sf_factory_routing_parameters', array ( |
|
98 'load_configuration' => true, |
|
99 'suffix' => '', |
|
100 'default_module' => 'default', |
|
101 'default_action' => 'index', |
|
102 'debug' => '1', |
|
103 'logging' => '1', |
|
104 'generate_shortest_url' => true, |
|
105 'extra_parameters_as_query_string' => true, |
|
106 )))); |
|
107 if ($parameters = $this->factories['routing']->parse($this->factories['request']->getPathInfo())) |
|
108 { |
|
109 $this->factories['request']->addRequestParameters($parameters); |
|
110 } |
|
111 |
|
112 $class = sfConfig::get('sf_factory_storage', 'sfSessionStorage'); |
|
113 $this->factories['storage'] = new $class(array_merge(array( |
|
114 'auto_shutdown' => false, 'session_id' => $this->getRequest()->getParameter('symfony'), |
|
115 ), sfConfig::get('sf_factory_storage_parameters', array ( |
|
116 'session_name' => 'symfony', |
|
117 )))); |
|
118 $class = sfConfig::get('sf_factory_user', 'myUser'); |
|
119 $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', array ( |
|
120 'timeout' => 1800, |
|
121 'logging' => '1', |
|
122 'use_flash' => true, |
|
123 'default_culture' => 'en', |
|
124 )))); |
|
125 |
|
126 if (sfConfig::get('sf_cache')) |
|
127 { |
|
128 $class = sfConfig::get('sf_factory_view_cache', 'sfFileCache'); |
|
129 $cache = new $class(sfConfig::get('sf_factory_view_cache_parameters', array ( |
|
130 'automatic_cleaning_factor' => 0, |
|
131 'cache_dir' => '/Users/gautierthibault/Sites/thd/cache/frontend/dev/template', |
|
132 'lifetime' => 86400, |
|
133 'prefix' => '/Users/gautierthibault/Sites/thd/apps/frontend/template', |
|
134 ))); |
|
135 $this->factories['viewCacheManager'] = new sfViewCacheManager($this, $cache); |
|
136 } |
|
137 else |
|
138 { |
|
139 $this->factories['viewCacheManager'] = null; |
|
140 } |
|
141 |
|