In this hour we focus on a particular implementation of the MVC pattern. The so-called front controller pattern places a single controller class at the heart of the system, where it fields requests, invokes commands, and dispatches views.
Although a controller object lies at the heart of our MVC system, it is also simple. Let’s take a look at one. Listing 24.1 shows a stripped-down controller object, called Controller.php. We are going to maintain a crude package system based on the directories that enclose our scripts. Controller.php belongs in the controller package.
1: <? 2: // controller/Controller.php 3: // qframe license: http://resources.corrosive.co.uk/pkg/qframe/license.txt ...