index.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. * Welcome to Lithium! This front-controller file is the gateway to your application. It is
  10. * responsible for intercepting requests, and handing them off to the `Dispatcher` for processing.
  11. *
  12. * @see lithium\action\Dispatcher
  13. */
  14. /**
  15. * If you're sharing a single Lithium core install or other libraries among multiple
  16. * applications, you may need to manually set things like `LITHIUM_LIBRARY_PATH`. You can do that in
  17. * `config/bootstrap.php`, which is loaded below:
  18. */
  19. require dirname(__DIR__) . '/config/bootstrap.php';
  20. /**
  21. * The following will instantiate a new `Request` object and pass it off to the `Dispatcher` class.
  22. * By default, the `Request` will automatically aggregate all the server / environment settings, URL
  23. * and query string parameters, request content (i.e. POST or PUT data), and HTTP method and header
  24. * information.
  25. *
  26. * The `Request` is then used by the `Dispatcher` (in conjunction with the `Router`) to determine
  27. * the correct `Controller` object to dispatch to, and the correct response type to render. The
  28. * response information is then encapsulated in a `Response` object, which is returned from the
  29. * controller to the `Dispatcher`, and finally echoed below. Echoing a `Response` object causes its
  30. * headers to be written, and its response body to be written in a buffer loop.
  31. *
  32. * @see lithium\action\Request
  33. * @see lithium\action\Response
  34. * @see lithium\action\Dispatcher
  35. * @see lithium\net\http\Router
  36. * @see lithium\action\Controller
  37. */
  38. echo lithium\action\Dispatcher::run(new lithium\action\Request());
  39. ?>