bootstrap.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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 (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  15. *
  16. * Licensed under The MIT License
  17. * For full copyright and license information, please see the LICENSE.txt
  18. * Redistributions of files must retain the above copyright notice.
  19. *
  20. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  21. * @link http://cakephp.org CakePHP(tm) Project
  22. * @package app.Config
  23. * @since CakePHP(tm) v 0.10.8.2117
  24. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  25. */
  26. // Setup a 'default' cache configuration for use in the application.
  27. Cache::config('default', array('engine' => 'File'));
  28. /**
  29. * The settings below can be used to set additional paths to models, views and controllers.
  30. *
  31. * App::build(array(
  32. * 'Model' => array('/path/to/models/', '/next/path/to/models/'),
  33. * 'Model/Behavior' => array('/path/to/behaviors/', '/next/path/to/behaviors/'),
  34. * 'Model/Datasource' => array('/path/to/datasources/', '/next/path/to/datasources/'),
  35. * 'Model/Datasource/Database' => array('/path/to/databases/', '/next/path/to/database/'),
  36. * 'Model/Datasource/Session' => array('/path/to/sessions/', '/next/path/to/sessions/'),
  37. * 'Controller' => array('/path/to/controllers/', '/next/path/to/controllers/'),
  38. * 'Controller/Component' => array('/path/to/components/', '/next/path/to/components/'),
  39. * 'Controller/Component/Auth' => array('/path/to/auths/', '/next/path/to/auths/'),
  40. * 'Controller/Component/Acl' => array('/path/to/acls/', '/next/path/to/acls/'),
  41. * 'View' => array('/path/to/views/', '/next/path/to/views/'),
  42. * 'View/Helper' => array('/path/to/helpers/', '/next/path/to/helpers/'),
  43. * 'Console' => array('/path/to/consoles/', '/next/path/to/consoles/'),
  44. * 'Console/Command' => array('/path/to/commands/', '/next/path/to/commands/'),
  45. * 'Console/Command/Task' => array('/path/to/tasks/', '/next/path/to/tasks/'),
  46. * 'Lib' => array('/path/to/libs/', '/next/path/to/libs/'),
  47. * 'Locale' => array('/path/to/locales/', '/next/path/to/locales/'),
  48. * 'Vendor' => array('/path/to/vendors/', '/next/path/to/vendors/'),
  49. * 'Plugin' => array('/path/to/plugins/', '/next/path/to/plugins/'),
  50. * ));
  51. *
  52. */
  53. /**
  54. * Custom Inflector rules can be set to correctly pluralize or singularize table, model, controller names or whatever other
  55. * string is passed to the inflection functions
  56. *
  57. * Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
  58. * Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
  59. *
  60. */
  61. /**
  62. * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
  63. * Uncomment one of the lines below, as you need. Make sure you read the documentation on CakePlugin to use more
  64. * advanced ways of loading plugins
  65. *
  66. * CakePlugin::loadAll(); // Loads all plugins at once
  67. * CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit
  68. *
  69. */
  70. /**
  71. * You can attach event listeners to the request lifecycle as Dispatcher Filter. By default CakePHP bundles two filters:
  72. *
  73. * - AssetDispatcher filter will serve your asset files (css, images, js, etc) from your themes and plugins
  74. * - CacheDispatcher filter will read the Cache.check configure variable and try to serve cached content generated from controllers
  75. *
  76. * Feel free to remove or add filters as you see fit for your application. A few examples:
  77. *
  78. * Configure::write('Dispatcher.filters', array(
  79. * 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app.
  80. * 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
  81. * array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
  82. * array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
  83. *
  84. * ));
  85. */
  86. Configure::write('Dispatcher.filters', array(
  87. 'AssetDispatcher',
  88. 'CacheDispatcher'
  89. ));
  90. /**
  91. * Configures default file logging options
  92. */
  93. App::uses('CakeLog', 'Log');
  94. CakeLog::config('debug', array(
  95. 'engine' => 'File',
  96. 'types' => array('notice', 'info', 'debug'),
  97. 'file' => 'debug',
  98. ));
  99. CakeLog::config('error', array(
  100. 'engine' => 'File',
  101. 'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
  102. 'file' => 'error',
  103. ));