Base for a static organization website

bootstrap.php 4.5KB

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