bootstrap.php 5.2 KB

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