bootstrap.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. Cache::config('default', array('engine' => 'File'));
  86. /**
  87. * The settings below can be used to set additional paths to models, views and controllers.
  88. *
  89. * App::build(array(
  90. * 'Model' => array('/path/to/models', '/next/path/to/models'),
  91. * 'Model/Behavior' => array('/path/to/behaviors', '/next/path/to/behaviors'),
  92. * 'Model/Datasource' => array('/path/to/datasources', '/next/path/to/datasources'),
  93. * 'Model/Datasource/Database' => array('/path/to/databases', '/next/path/to/database'),
  94. * 'Model/Datasource/Session' => array('/path/to/sessions', '/next/path/to/sessions'),
  95. * 'Controller' => array('/path/to/controllers', '/next/path/to/controllers'),
  96. * 'Controller/Component' => array('/path/to/components', '/next/path/to/components'),
  97. * 'Controller/Component/Auth' => array('/path/to/auths', '/next/path/to/auths'),
  98. * 'Controller/Component/Acl' => array('/path/to/acls', '/next/path/to/acls'),
  99. * 'View' => array('/path/to/views', '/next/path/to/views'),
  100. * 'View/Helper' => array('/path/to/helpers', '/next/path/to/helpers'),
  101. * 'Console' => array('/path/to/consoles', '/next/path/to/consoles'),
  102. * 'Console/Command' => array('/path/to/commands', '/next/path/to/commands'),
  103. * 'Console/Command/Task' => array('/path/to/tasks', '/next/path/to/tasks'),
  104. * 'Lib' => array('/path/to/libs', '/next/path/to/libs'),
  105. * 'Locale' => array('/path/to/locales', '/next/path/to/locales'),
  106. * 'Vendor' => array('/path/to/vendors', '/next/path/to/vendors'),
  107. * 'Plugin' => array('/path/to/plugins', '/next/path/to/plugins'),
  108. * ));
  109. *
  110. */
  111. /**
  112. * Custom Inflector rules, can be set to correctly pluralize or singularize table, model, controller names or whatever other
  113. * string is passed to the inflection functions
  114. *
  115. * Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
  116. * Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
  117. *
  118. */
  119. /**
  120. * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
  121. * Uncomment one of the lines below, as you need. make sure you read the documentation on CakePlugin to use more
  122. * advanced ways of loading plugins
  123. *
  124. * CakePlugin::loadAll(); // Loads all plugins at once
  125. * CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit
  126. *
  127. */
  128. /**
  129. * You can attach event listeners to the request lifecyle as Dispatcher Filter . By Default CakePHP bundles two filters:
  130. *
  131. * - AssetDispatcher filter will serve your asset files (css, images, js, etc) from your themes and plugins
  132. * - CacheDispatcher filter will read the Cache.check configure variable and try to serve cached content generated from controllers
  133. *
  134. * Feel free to remove or add filters as you see fit for your application. A few examples:
  135. *
  136. * Configure::write('Dispatcher.filters', array(
  137. * 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app.
  138. * 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
  139. * array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
  140. * array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
  141. *
  142. * ));
  143. */
  144. Configure::write('Dispatcher.filters', array(
  145. 'AssetDispatcher',
  146. 'CacheDispatcher'
  147. ));