bootstrap.php 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /**
  3. * Lithium: the most rad php framework
  4. *
  5. * @copyright Copyright 2013, Union of RAD (http://union-of-rad.org)
  6. * @license http://opensource.org/licenses/bsd-license.php The BSD License
  7. */
  8. /**
  9. * This is the primary bootstrap file of your application, and is loaded immediately after the front
  10. * controller (`webroot/index.php`) is invoked. It includes references to other feature-specific
  11. * bootstrap files that you can turn on and off to configure the services needed for your
  12. * application.
  13. *
  14. * Besides global configuration of external application resources, these files also include
  15. * configuration for various classes to interact with one another, usually through _filters_.
  16. * Filters are Lithium's system of creating interactions between classes without tight coupling. See
  17. * the `Filters` class for more information.
  18. *
  19. * If you have other services that must be configured globally for the entire application, create a
  20. * new bootstrap file and `require` it here.
  21. *
  22. * @see lithium\util\collection\Filters
  23. */
  24. /**
  25. * The libraries file contains the loading instructions for all plugins, frameworks and other class
  26. * libraries used in the application, including the Lithium core, and the application itself. These
  27. * instructions include library names, paths to files, and any applicable class-loading rules. This
  28. * file also statically loads common classes to improve bootstrap performance.
  29. */
  30. require __DIR__ . '/bootstrap/libraries.php';
  31. /**
  32. * The error configuration allows you to use the filter system along with the advanced matching
  33. * rules of the `ErrorHandler` class to provide a high level of control over managing exceptions in
  34. * your application, with no impact on framework or application code.
  35. */
  36. // require __DIR__ . '/bootstrap/errors.php';
  37. /**
  38. * This file defines bindings between classes which are triggered during the request cycle, and
  39. * allow the framework to automatically configure its environmental settings. You can add your own
  40. * behavior and modify the dispatch cycle to suit your needs.
  41. */
  42. require __DIR__ . '/bootstrap/action.php';
  43. /**
  44. * This file contains configurations for connecting to external caching resources, as well as
  45. * default caching rules for various systems within your application
  46. */
  47. require __DIR__ . '/bootstrap/cache.php';
  48. /**
  49. * Include this file if your application uses one or more database connections.
  50. */
  51. require __DIR__ . '/bootstrap/connections.php';
  52. /**
  53. * This file contains configuration for session (and/or cookie) storage, and user or web service
  54. * authentication.
  55. */
  56. // require __DIR__ . '/bootstrap/session.php';
  57. /**
  58. * This file contains your application's globalization rules, including inflections,
  59. * transliterations, localized validation, and how localized text should be loaded. Uncomment this
  60. * line if you plan to globalize your site.
  61. */
  62. // require __DIR__ . '/bootstrap/g11n.php';
  63. /**
  64. * This file contains configurations for handling different content types within the framework,
  65. * including converting data to and from different formats, and handling static media assets.
  66. */
  67. // require __DIR__ . '/bootstrap/media.php';
  68. /**
  69. * This file configures console filters and settings, specifically output behavior and coloring.
  70. */
  71. if (PHP_SAPI === 'cli') {
  72. require __DIR__ . '/bootstrap/console.php';
  73. }
  74. ?>