Skip to content

Add Front Controller Extra Include #12

@volomike

Description

@volomike

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions