sFire PHP Framework

Boot.php

Every module can have its own boot.php. The boot.php is a file that will be loaded before a module is loaded. This is a good time to set for example response headers like the X-Frame-Options or to send your users from HTTP to HTTPS.

This file will be executed if readable and is loaded after the initializing of all the routes defined in the routes.php. So all the application settings are available without the module being loaded. After the execution of the boot.php, the module will be loaded.

Example
<?php
use sFire\HTTP\Response;

Response :: addHeader('X-Frame-Options', 'SAMEORIGIN');
?>