PageRenderTime 42ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/bk/lib/Cake/Console/Templates/skel/Config/core.php

https://gitlab.com/digaotinfo/agendaLegislativa
PHP | 336 lines | 45 code | 24 blank | 267 comment | 5 complexity | d86ec5ddd993eca4b862ab93af3ba521 MD5 | raw file
  1. <?php
  2. /**
  3. * This is core configuration file.
  4. *
  5. * Use it to configure core behavior of Cake.
  6. *
  7. * PHP 5
  8. *
  9. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  10. * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  11. *
  12. * Licensed under The MIT License
  13. * Redistributions of files must retain the above copyright notice.
  14. *
  15. * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  16. * @link http://cakephp.org CakePHP(tm) Project
  17. * @package app.Config
  18. * @since CakePHP(tm) v 0.2.9
  19. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  20. */
  21. /**
  22. * CakePHP Debug Level:
  23. *
  24. * Production Mode:
  25. * 0: No error messages, errors, or warnings shown. Flash messages redirect.
  26. *
  27. * Development Mode:
  28. * 1: Errors and warnings shown, model caches refreshed, flash messages halted.
  29. * 2: As in 1, but also with full debug messages and SQL output.
  30. *
  31. * In production mode, flash messages redirect after a time interval.
  32. * In development mode, you need to click the flash message to continue.
  33. */
  34. Configure::write('debug', 2);
  35. /**
  36. * Configure the Error handler used to handle errors for your application. By default
  37. * ErrorHandler::handleError() is used. It will display errors using Debugger, when debug > 0
  38. * and log errors with CakeLog when debug = 0.
  39. *
  40. * Options:
  41. *
  42. * - `handler` - callback - The callback to handle errors. You can set this to any callback type,
  43. * including anonymous functions.
  44. * - `level` - int - The level of errors you are interested in capturing.
  45. * - `trace` - boolean - Include stack traces for errors in log files.
  46. *
  47. * @see ErrorHandler for more information on error handling and configuration.
  48. */
  49. Configure::write('Error', array(
  50. 'handler' => 'ErrorHandler::handleError',
  51. 'level' => E_ALL & ~E_DEPRECATED,
  52. 'trace' => true
  53. ));
  54. /**
  55. * Configure the Exception handler used for uncaught exceptions. By default,
  56. * ErrorHandler::handleException() is used. It will display a HTML page for the exception, and
  57. * while debug > 0, framework errors like Missing Controller will be displayed. When debug = 0,
  58. * framework errors will be coerced into generic HTTP errors.
  59. *
  60. * Options:
  61. *
  62. * - `handler` - callback - The callback to handle exceptions. You can set this to any callback type,
  63. * including anonymous functions.
  64. * - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you
  65. * should place the file for that class in app/Lib/Error. This class needs to implement a render method.
  66. * - `log` - boolean - Should Exceptions be logged?
  67. *
  68. * @see ErrorHandler for more information on exception handling and configuration.
  69. */
  70. Configure::write('Exception', array(
  71. 'handler' => 'ErrorHandler::handleException',
  72. 'renderer' => 'ExceptionRenderer',
  73. 'log' => true
  74. ));
  75. /**
  76. * Application wide charset encoding
  77. */
  78. Configure::write('App.encoding', 'UTF-8');
  79. /**
  80. * To configure CakePHP *not* to use mod_rewrite and to
  81. * use CakePHP pretty URLs, remove these .htaccess
  82. * files:
  83. *
  84. * /.htaccess
  85. * /app/.htaccess
  86. * /app/webroot/.htaccess
  87. *
  88. * And uncomment the App.baseUrl below:
  89. */
  90. //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
  91. /**
  92. * Uncomment the define below to use CakePHP prefix routes.
  93. *
  94. * The value of the define determines the names of the routes
  95. * and their associated controller actions:
  96. *
  97. * Set to an array of prefixes you want to use in your application. Use for
  98. * admin or other prefixed routes.
  99. *
  100. * Routing.prefixes = array('admin', 'manager');
  101. *
  102. * Enables:
  103. * `admin_index()` and `/admin/controller/index`
  104. * `manager_index()` and `/manager/controller/index`
  105. *
  106. */
  107. //Configure::write('Routing.prefixes', array('admin'));
  108. /**
  109. * Turn off all caching application-wide.
  110. *
  111. */
  112. //Configure::write('Cache.disable', true);
  113. /**
  114. * Enable cache checking.
  115. *
  116. * If set to true, for view caching you must still use the controller
  117. * public $cacheAction inside your controllers to define caching settings.
  118. * You can either set it controller-wide by setting public $cacheAction = true,
  119. * or in each action using $this->cacheAction = true.
  120. *
  121. */
  122. //Configure::write('Cache.check', true);
  123. /**
  124. * Defines the default error type when using the log() function. Used for
  125. * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
  126. */
  127. define('LOG_ERROR', 2);
  128. /**
  129. * Session configuration.
  130. *
  131. * Contains an array of settings to use for session configuration. The defaults key is
  132. * used to define a default preset to use for sessions, any settings declared here will override
  133. * the settings of the default config.
  134. *
  135. * ## Options
  136. *
  137. * - `Session.cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'
  138. * - `Session.timeout` - The number of minutes you want sessions to live for. This timeout is handled by CakePHP
  139. * - `Session.cookieTimeout` - The number of minutes you want session cookies to live for.
  140. * - `Session.checkAgent` - Do you want the user agent to be checked when starting sessions? You might want to set the
  141. * value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX
  142. * - `Session.defaults` - The default configuration set to use as a basis for your session.
  143. * There are four builtins: php, cake, cache, database.
  144. * - `Session.handler` - Can be used to enable a custom session handler. Expects an array of of callables,
  145. * that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler`
  146. * to the ini array.
  147. * - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and
  148. * sessionids that change frequently. See CakeSession::$requestCountdown.
  149. * - `Session.ini` - An associative array of additional ini values to set.
  150. *
  151. * The built in defaults are:
  152. *
  153. * - 'php' - Uses settings defined in your php.ini.
  154. * - 'cake' - Saves session files in CakePHP's /tmp directory.
  155. * - 'database' - Uses CakePHP's database sessions.
  156. * - 'cache' - Use the Cache class to save sessions.
  157. *
  158. * To define a custom session handler, save it at /app/Model/Datasource/Session/<name>.php.
  159. * Make sure the class implements `CakeSessionHandlerInterface` and set Session.handler to <name>
  160. *
  161. * To use database sessions, run the app/Config/Schema/sessions.php schema using
  162. * the cake shell command: cake schema create Sessions
  163. *
  164. */
  165. Configure::write('Session', array(
  166. 'defaults' => 'php'
  167. ));
  168. /**
  169. * The level of CakePHP security.
  170. */
  171. Configure::write('Security.level', 'medium');
  172. /**
  173. * A random string used in security hashing methods.
  174. */
  175. Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
  176. /**
  177. * A random numeric string (digits only) used to encrypt/decrypt strings.
  178. */
  179. Configure::write('Security.cipherSeed', '76859309657453542496749683645');
  180. /**
  181. * Apply timestamps with the last modified time to static assets (js, css, images).
  182. * Will append a querystring parameter containing the time the file was modified. This is
  183. * useful for invalidating browser caches.
  184. *
  185. * Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable
  186. * timestamping regardless of debug value.
  187. */
  188. //Configure::write('Asset.timestamp', true);
  189. /**
  190. * Compress CSS output by removing comments, whitespace, repeating tags, etc.
  191. * This requires a/var/cache directory to be writable by the web server for caching.
  192. * and /vendors/csspp/csspp.php
  193. *
  194. * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
  195. */
  196. //Configure::write('Asset.filter.css', 'css.php');
  197. /**
  198. * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
  199. * output, and setting the config below to the name of the script.
  200. *
  201. * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
  202. */
  203. //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
  204. /**
  205. * The classname and database used in CakePHP's
  206. * access control lists.
  207. */
  208. Configure::write('Acl.classname', 'DbAcl');
  209. Configure::write('Acl.database', 'default');
  210. /**
  211. * Uncomment this line and correct your server timezone to fix
  212. * any date & time related errors.
  213. */
  214. //date_default_timezone_set('UTC');
  215. /**
  216. *
  217. * Cache Engine Configuration
  218. * Default settings provided below
  219. *
  220. * File storage engine.
  221. *
  222. * Cache::config('default', array(
  223. * 'engine' => 'File', //[required]
  224. * 'duration' => 3600, //[optional]
  225. * 'probability' => 100, //[optional]
  226. * 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
  227. * 'prefix' => 'cake_', //[optional] prefix every cache file with this string
  228. * 'lock' => false, //[optional] use file locking
  229. * 'serialize' => true, [optional]
  230. * ));
  231. *
  232. * APC (http://pecl.php.net/package/APC)
  233. *
  234. * Cache::config('default', array(
  235. * 'engine' => 'Apc', //[required]
  236. * 'duration' => 3600, //[optional]
  237. * 'probability' => 100, //[optional]
  238. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  239. * ));
  240. *
  241. * Xcache (http://xcache.lighttpd.net/)
  242. *
  243. * Cache::config('default', array(
  244. * 'engine' => 'Xcache', //[required]
  245. * 'duration' => 3600, //[optional]
  246. * 'probability' => 100, //[optional]
  247. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  248. * 'user' => 'user', //user from xcache.admin.user settings
  249. * 'password' => 'password', //plaintext password (xcache.admin.pass)
  250. * ));
  251. *
  252. * Memcache (http://www.danga.com/memcached/)
  253. *
  254. * Cache::config('default', array(
  255. * 'engine' => 'Memcache', //[required]
  256. * 'duration' => 3600, //[optional]
  257. * 'probability' => 100, //[optional]
  258. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  259. * 'servers' => array(
  260. * '127.0.0.1:11211' // localhost, default port 11211
  261. * ), //[optional]
  262. * 'persistent' => true, // [optional] set this to false for non-persistent connections
  263. * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
  264. * ));
  265. *
  266. * Wincache (http://php.net/wincache)
  267. *
  268. * Cache::config('default', array(
  269. * 'engine' => 'Wincache', //[required]
  270. * 'duration' => 3600, //[optional]
  271. * 'probability' => 100, //[optional]
  272. * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
  273. * ));
  274. */
  275. /**
  276. * Pick the caching engine to use. If APC is enabled use it.
  277. * If running via cli - apc is disabled by default. ensure it's available and enabled in this case
  278. *
  279. */
  280. $engine = 'File';
  281. if (extension_loaded('apc') && function_exists('apc_dec') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
  282. $engine = 'Apc';
  283. }
  284. // In development mode, caches should expire quickly.
  285. $duration = '+999 days';
  286. if (Configure::read('debug') >= 1) {
  287. $duration = '+10 seconds';
  288. }
  289. // Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
  290. $prefix = 'myapp_';
  291. /**
  292. * Configure the cache used for general framework caching. Path information,
  293. * object listings, and translation cache files are stored with this configuration.
  294. */
  295. Cache::config('_cake_core_', array(
  296. 'engine' => $engine,
  297. 'prefix' => $prefix . 'cake_core_',
  298. 'path' => CACHE . 'persistent' . DS,
  299. 'serialize' => ($engine === 'File'),
  300. 'duration' => $duration
  301. ));
  302. /**
  303. * Configure the cache for model and datasource caches. This cache configuration
  304. * is used to store schema descriptions, and table listings in connections.
  305. */
  306. Cache::config('_cake_model_', array(
  307. 'engine' => $engine,
  308. 'prefix' => $prefix . 'cake_model_',
  309. 'path' => CACHE . 'models' . DS,
  310. 'serialize' => ($engine === 'File'),
  311. 'duration' => $duration
  312. ));