bootstrap.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <?php
  2. /**
  3. * This file is loaded automatically by the app/webroot/index.php file after core.php
  4. *
  5. * This file should load/create any application wide configuration settings, such as
  6. * Caching, Logging, loading additional configuration files.
  7. *
  8. * You should also use this file to include any files that provide global functions/constants
  9. * that your application uses.
  10. *
  11. * PHP 5
  12. *
  13. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  14. * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  15. *
  16. * Licensed under The MIT License
  17. * Redistributions of files must retain the above copyright notice.
  18. *
  19. * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  20. * @link http://cakephp.org CakePHP(tm) Project
  21. * @package app.Config
  22. * @since CakePHP(tm) v 0.10.8.2117
  23. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  24. */
  25. /**
  26. * Cache Engine Configuration
  27. * Default settings provided below
  28. *
  29. * File storage engine.
  30. *
  31. * Cache::config('default', array(
  32. * 'engine' => 'File', //[required]
  33. * 'duration'=> 3600, //[optional]
  34. * 'probability'=> 100, //[optional]
  35. * 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
  36. * 'prefix' => 'cake_', //[optional] prefix every cache file with this string
  37. * 'lock' => false, //[optional] use file locking
  38. * 'serialize' => true, // [optional]
  39. * 'mask' => 0666, // [optional] permission mask to use when creating cache files
  40. * ));
  41. *
  42. * APC (http://pecl.php.net/package/APC)
  43. *
  44. * Cache::config('default', array(
  45. * 'engine' => 'Apc', //[required]
  46. * 'duration'=> 3600, //[optional]
  47. * 'probability'=> 100, //[optional]
  48. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  49. * ));
  50. *
  51. * Xcache (http://xcache.lighttpd.net/)
  52. *
  53. * Cache::config('default', array(
  54. * 'engine' => 'Xcache', //[required]
  55. * 'duration'=> 3600, //[optional]
  56. * 'probability'=> 100, //[optional]
  57. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  58. * 'user' => 'user', //user from xcache.admin.user settings
  59. * 'password' => 'password', //plaintext password (xcache.admin.pass)
  60. * ));
  61. *
  62. * Memcache (http://memcached.org/)
  63. *
  64. * Cache::config('default', array(
  65. * 'engine' => 'Memcache', //[required]
  66. * 'duration'=> 3600, //[optional]
  67. * 'probability'=> 100, //[optional]
  68. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  69. * 'servers' => array(
  70. * '127.0.0.1:11211' // localhost, default port 11211
  71. * ), //[optional]
  72. * 'persistent' => true, // [optional] set this to false for non-persistent connections
  73. * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
  74. * ));
  75. *
  76. * Wincache (http://php.net/wincache)
  77. *
  78. * Cache::config('default', array(
  79. * 'engine' => 'Wincache', //[required]
  80. * 'duration'=> 3600, //[optional]
  81. * 'probability'=> 100, //[optional]
  82. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  83. * ));
  84. *
  85. * Redis (http://http://redis.io/)
  86. *
  87. * Cache::config('default', array(
  88. * 'engine' => 'Redis', //[required]
  89. * 'duration'=> 3600, //[optional]
  90. * 'probability'=> 100, //[optional]
  91. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  92. * 'server' => '127.0.0.1' // localhost
  93. * 'port' => 6379 // default port 6379
  94. * 'timeout' => 0 // timeout in seconds, 0 = unlimited
  95. * 'persistent' => true, // [optional] set this to false for non-persistent connections
  96. * ));
  97. */
  98. Cache::config('default', array('engine' => 'File'));
  99. /**
  100. * The settings below can be used to set additional paths to models, views and controllers.
  101. *
  102. * App::build(array(
  103. * 'Model' => array('/path/to/models', '/next/path/to/models'),
  104. * 'Model/Behavior' => array('/path/to/behaviors', '/next/path/to/behaviors'),
  105. * 'Model/Datasource' => array('/path/to/datasources', '/next/path/to/datasources'),
  106. * 'Model/Datasource/Database' => array('/path/to/databases', '/next/path/to/database'),
  107. * 'Model/Datasource/Session' => array('/path/to/sessions', '/next/path/to/sessions'),
  108. * 'Controller' => array('/path/to/controllers', '/next/path/to/controllers'),
  109. * 'Controller/Component' => array('/path/to/components', '/next/path/to/components'),
  110. * 'Controller/Component/Auth' => array('/path/to/auths', '/next/path/to/auths'),
  111. * 'Controller/Component/Acl' => array('/path/to/acls', '/next/path/to/acls'),
  112. * 'View' => array('/path/to/views', '/next/path/to/views'),
  113. * 'View/Helper' => array('/path/to/helpers', '/next/path/to/helpers'),
  114. * 'Console' => array('/path/to/consoles', '/next/path/to/consoles'),
  115. * 'Console/Command' => array('/path/to/commands', '/next/path/to/commands'),
  116. * 'Console/Command/Task' => array('/path/to/tasks', '/next/path/to/tasks'),
  117. * 'Lib' => array('/path/to/libs', '/next/path/to/libs'),
  118. * 'Locale' => array('/path/to/locales', '/next/path/to/locales'),
  119. * 'Vendor' => array('/path/to/vendors', '/next/path/to/vendors'),
  120. * 'Plugin' => array('/path/to/plugins', '/next/path/to/plugins'),
  121. * ));
  122. *
  123. */
  124. /**
  125. * Custom Inflector rules, can be set to correctly pluralize or singularize table, model, controller names or whatever other
  126. * string is passed to the inflection functions
  127. *
  128. * Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
  129. * Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
  130. *
  131. */
  132. /**
  133. * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
  134. * Uncomment one of the lines below, as you need. make sure you read the documentation on CakePlugin to use more
  135. * advanced ways of loading plugins
  136. *
  137. * CakePlugin::loadAll(); // Loads all plugins at once
  138. * CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit
  139. *
  140. */
  141. /**
  142. * You can attach event listeners to the request lifecyle as Dispatcher Filter . By Default CakePHP bundles two filters:
  143. *
  144. * - AssetDispatcher filter will serve your asset files (css, images, js, etc) from your themes and plugins
  145. * - CacheDispatcher filter will read the Cache.check configure variable and try to serve cached content generated from controllers
  146. *
  147. * Feel free to remove or add filters as you see fit for your application. A few examples:
  148. *
  149. * Configure::write('Dispatcher.filters', array(
  150. * 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app.
  151. * 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
  152. * array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
  153. * array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
  154. *
  155. * ));
  156. */
  157. Configure::write('Dispatcher.filters', array(
  158. 'AssetDispatcher',
  159. 'CacheDispatcher'
  160. ));
  161. /**
  162. * Configures default file logging options
  163. */
  164. App::uses('CakeLog', 'Log');
  165. CakeLog::config('debug', array(
  166. 'engine' => 'FileLog',
  167. 'types' => array('notice', 'info', 'debug'),
  168. 'file' => 'debug',
  169. ));
  170. CakeLog::config('error', array(
  171. 'engine' => 'FileLog',
  172. 'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
  173. 'file' => 'error',
  174. ));