index.php 1.0 KB

123456789101112131415161718192021
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. // Classic global.inc.php file now returns a Application object
  4. $app = require_once '../main/inc/global.inc.php';
  5. /*
  6. In order to execute Chamilo, $app->run() is needed.
  7. $app->run(); shows a page depending of the URL for example when entering in "/web/index"
  8. Chamilo will render the controller IndexController->indexAction() this is because a router was assign at the end of
  9. global.inc.php:
  10. $app->get('/index', 'index.controller:indexAction')->bind('index');
  11. The "index.controller:indexAction" string is transformed (due a controller - service approach) into
  12. ChamiloLMS\Controller\IndexController->indexAction() see more at: http://silex.sensiolabs.org/doc/providers/service_controller.html
  13. The class is loaded automatically (no require_once needed) thanks to the namespace ChamiloLMS added in Composer.
  14. The location of the file is src\ChamiloLMS\Controller\IndexController.php following the PSR-1 standards.
  15. */
  16. $app->run();
  17. //$app['http_cache']->run();