Faster icon indicating copy to clipboard operation
Faster copied to clipboard

Add Front Controller Extra Include

Open volomike opened this issue 14 years ago • 0 comments

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.

volomike avatar Oct 17 '11 06:10 volomike