index.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /** Composer autoload */
  4. require_once __DIR__.'/../vendor/autoload.php';
  5. /**
  6. * Classic global.inc.php file now returns a Application object
  7. * Make sure you read the documentation/installation_guide.html to learn how
  8. * to configure your VirtualHost to allow for overrides.
  9. */
  10. /**
  11. * Inclusion of main setup script
  12. */
  13. $app = require_once '../main/inc/global.inc.php';
  14. /**
  15. * In order to execute Chamilo, you need to call the $app->run() method.
  16. * This method renders a page depending of the URL, for example when entering
  17. * to "/web/index" Chamilo will call the controller "IndexController->indexAction()". This is
  18. * because a router was assigned in the router.php file
  19. *
  20. * $app->get('/index', 'index.controller:indexAction')->bind('index');
  21. *
  22. * The "index.controller:indexAction" string is transformed (due a
  23. * controller - service approach) into the method:
  24. * ChamiloLMS\Controller\IndexController->indexAction() see more
  25. * at: http://silex.sensiolabs.org/doc/providers/service_controller.html
  26. * The class is loaded automatically (no require_once needed) thanks to the
  27. * namespace ChamiloLMS added in Composer.
  28. * The location of the file is src\ChamiloLMS\Controller\IndexController.php
  29. * following the PSR-1 standards.
  30. */
  31. /** @var \Silex\Application $app */
  32. $app->run();