volomike/Faster — Issue #12: Add Front Controller Extra Include
Author: volomike
Created: 2011-10-17 06:49:12+00:00
State: open
Labels: Feature

In Faster, the index.php is not only the front controller, but also the framework bootstrap. I was asked if someone should edit the index.php file for things like global constants or functions they want to easily make available to all the page controllers. I recommended against editing the index.php because then it makes it hard to debug if this gets out of hand, where you want to figure out what was a bug in the framework versus your editing of the index.php.

The user requested that we have an "app/extra.php" file added to the framework that gets called with an include() before "// handle our front controller task". Therefore, we can add global constants and helper functions.

I thought it was a good idea, and will include it in a future release -- definitely.