Request Life Cycle

All requests to the application are handled through public/index.php with the exceptions of files in the public directory, Apache is in charge of serving those.

Below you will see the index.php file that ships with Disco, that is really all there is to running the app.

//Require the composer autoloader. 
require dirname(__DIR__) . '/vendor/autoload.php';

//Setup the application

try {

    //Include the application logic
    require '../app/index.php';

    //Tear down the app

} catch(\Exception $e){

    // You better handle this!
    // 500 error for default.

The setup method of App preps the app by:

The teardown method of the App serves the current View if necessary.