Views
Views are generally pure HTML mixed with some template variables like {templateVariable}. In this framework I have decided to split the view into 2 sections Templates and Contents
The flow of the page is as follows for a sample URL http://macs-framework.sourceforge.net/index.php/controller/function :
- At the start of the request the index.php file is hit
- The index.php file then passes the control to the core of the framework
-
The framework then analyzes the URL and then loads and initializes the controller
and then passes control to the function withing the controller.
NOTE: If you do not pass a controller and a function in the URL it calls the default controller which is 'main' and the default function which is 'index' these can be changed by opening the 'Config.php' file and changing the variables:public $defaultController = 'main';
public $defaultFunction = 'index';