<?php
#abstract because it should only be extended, not instantiated
abstract class Controller
{
protected $registry; # protected so that it is accessible from other classes as well.
function __construct($registry)
{
$this->registry = $registry;
}
# all controllers must contain an index method
abstract function index();
protected function redirect($url)
{
header('LOCATION: ' . html_entity_decode($url));
exit();
}
}
?>