Every request in concrete5 system runs through index.php in the web root. While the system uses pretty URLs, Apache's mod_rewrite module is responsible for re-routing these calls behind the scenes. Index.php then takes that entire request, and sends it to dispatcher.php, which lives inside the base application directory. This is done so that multiple concrete5 websites can share one set of files on a given server.
First, concrete5 loads basic configuration items, including its own internal configuration and the site's config/site.php (which contains database connection information, etc...). If this file doesn't exist, the site will be detected as new, the visitor will be shown the installation form. If the site is already installed and functional, the database will be connected to, and session will be automatically started.
Next, core libraries and classes are loaded, along with some autoload routines, some database encoding routines, and most of the items in the concrete/startup directory. Generally, these are procedural routines that are run on every page request.
Next, user's are loaded up in the startup/user.php routine, and the current Request object is obtained. From this, we determine which page to render, and check permissions on this page using Permissions($page); Additional permissions check determine whether the requested version of the page is viewable by the visitor, and go through the process of checking to see whether certain edit routines are taking place on the page. Finally, the page is rendered using
$v =View::getInstance(); $v->render($c); // $c = current page object
Recent Discussions on this Topic
No responses have been posted yet.