I suppose, like this :
PHP Code:
class FrontController {
var $filterManager;
function FrontController() {
$this->filterManager =& new FilterManager();
}
function serve()
{
// run filters
$this->filterManager->execute();
// select pagecontroller
$page = $this->getPageName();
// run pagecontroller
$this->executePageController($page);
}
function executePageController($page)
{
if( $class = $this->includePageController() ) {
$pageController =& new $class();
$pageController->execute();
}
}
}
As far as i interpret it : The FrontController is the main entrypoint for your application (hence
front). Normally you enter php by the execution of the script
index.php. If you weren't using OO-syntax at all, you could say that index.php is your frontcontroller. To translate this procedural implementation into the OO-world, you could make a class called FrontController that does the exact same thing as index.php. So to keep it clean, you shouldn't do anything in index.php except include, instanciate and execute the class FrontController.