Guest User

Untitled

a guest
Nov 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.87 KB | None | 0 0
  1. <?php
  2. // auto-generated by sfFactoryConfigHandler
  3. // date: 2011/08/24 14:44:23
  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' => '/sites/dev/revinate/deploy/revinate/log/frontend_dev-local.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' => '/sites/dev/revinate/deploy/revinate/cache/frontend/dev-local/i18n',
  30. 'lifetime' => 31556926,
  31. 'prefix' => '/sites/dev/revinate/deploy/revinate/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' => true,
  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 sfRevinateMemcacheCache(array (
  91. 'automatic_cleaning_factor' => 0,
  92. 'cache_dir' => '/sites/dev/revinate/deploy/revinate/cache/frontend/dev-local/config/routing',
  93. 'lifetime' => 86400,
  94. 'prefix' => '/sites/dev/revinate/deploy/revinate/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' => '',
  103. 'logging' => '1',
  104. 'generate_shortest_url' => true,
  105. 'extra_parameters_as_query_string' => true,
  106. 'segment_separators' =>
  107. array (
  108. 0 => '/',
  109. ),
  110. 'lazy_routes_deserialize' => true,
  111. 'lookup_cache_dedicated_keys' => true,
  112. ))));
  113. if ($parameters = $this->factories['routing']->parse($this->factories['request']->getPathInfo()))
  114. {
  115. $this->factories['request']->addRequestParameters($parameters);
  116. }
  117.  
  118. $class = sfConfig::get('sf_factory_storage', 'sfCacheSessionStorage');
  119. $this->factories['storage'] = new $class(array_merge(array(
  120. 'auto_shutdown' => false, 'session_id' => $this->getRequest()->getParameter('r_session'),
  121. ), sfConfig::get('sf_factory_storage_parameters', array (
  122. 'session_name' => 'r_session',
  123. 'session_cookie_path' => '/',
  124. 'session_cookie_domain' => '.revinate.com',
  125. 'session_cookie_lifetime' => '+30 days',
  126. 'session_cookie_secure' => false,
  127. 'session_cookie_http_only' => true,
  128. 'cache' =>
  129. array (
  130. 'class' => 'sfRevinateMemcacheCache',
  131. ),
  132. ))));
  133. $class = sfConfig::get('sf_factory_user', 'myUser');
  134. $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 (
  135. 'timeout' => 14400,
  136. 'logging' => '1',
  137. 'use_flash' => true,
  138. 'default_culture' => 'en',
  139. ))));
  140.  
  141. if (sfConfig::get('sf_cache'))
  142. {
  143. $class = sfConfig::get('sf_factory_view_cache', 'sfFileCache');
  144. $cache = new $class(sfConfig::get('sf_factory_view_cache_parameters', array (
  145. 'automatic_cleaning_factor' => 0,
  146. 'cache_dir' => '/sites/dev/revinate/deploy/revinate/cache/frontend/dev-local/template',
  147. 'lifetime' => 86400,
  148. 'prefix' => '/sites/dev/revinate/deploy/revinate/apps/frontend/template',
  149. )));
  150. $this->factories['viewCacheManager'] = new sfViewCacheManager($this, $cache);
  151. }
  152. else
  153. {
  154. $this->factories['viewCacheManager'] = null;
  155. }
Add Comment
Please, Sign In to add comment