From cb9c47ee4bb5be4b8ff13bc2fa0be71fd31bb542 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 13 Mar 2013 10:15:43 +0100 Subject: [PATCH] Adding temporal documentation (not final) --- web/index.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/web/index.php b/web/index.php index 7b9dd72989..7e2ace77b6 100644 --- a/web/index.php +++ b/web/index.php @@ -1,6 +1,21 @@ run() is needed. + $app->run(); shows a page depending of the URL for example when entering in "/web/index" + Chamilo will render the Controller IndexController->indexAction() this is because a router was assign at the end of + global.inc.php: + + $app->get('/index', 'index.controller:indexAction')->bind('index'); + + The "index.controller:indexAction" string is transformed (due a controller - service approach) into + ChamiloLMS\Controller\IndexController->indexAction() see more at: http://silex.sensiolabs.org/doc/providers/service_controller.html + The class is loaded automatically (no require_once needed) thanks to the namespace ChamiloLMS added in Composer. + The location of the file is src\ChamiloLMS\Controller\IndexController.php following the PSR-1 standards. +*/ $app->run(); //$app['http_cache']->run(); \ No newline at end of file