Base for a static organization website

bootstrap.php 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. * Custom Inflector rules can be set to correctly pluralize or singularize table, model, controller names or whatever other
  52. * string is passed to the inflection functions
  53. *
  54. * Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
  55. * Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
  56. */
  57. /**
  58. * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
  59. * Uncomment one of the lines below, as you need. Make sure you read the documentation on CakePlugin to use more
  60. * advanced ways of loading plugins
  61. *
  62. * CakePlugin::loadAll(); // Loads all plugins at once
  63. * CakePlugin::load('DebugKit'); // Loads a single plugin named DebugKit
  64. */
  65. /**
  66. * To prefer app translation over plugin translation, you can set
  67. *
  68. * Configure::write('I18n.preferApp', true);
  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. * 'MyCacheFilter' => array('prefix' => 'my_cache_'), // will use MyCacheFilter class from the Routing/Filter package in your app with settings array.
  81. * 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
  82. * array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
  83. * array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
  84. *
  85. * ));
  86. */
  87. Configure::write('Dispatcher.filters', array(
  88. 'AssetDispatcher',
  89. 'CacheDispatcher'
  90. ));
  91. /**
  92. * Configures default file logging options
  93. */
  94. App::uses('CakeLog', 'Log');
  95. CakeLog::config('debug', array(
  96. 'engine' => 'File',
  97. 'types' => array('notice', 'info', 'debug'),
  98. 'file' => 'debug',
  99. ));
  100. CakeLog::config('error', array(
  101. 'engine' => 'File',
  102. 'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
  103. 'file' => 'error',
  104. ));