public function dispatch($action = 'index')
{
if (method_exists($this, $action)) {
if (null !== $this->project->logger()) {
$this->project->log("Dispatch ['" . get_class($this) . "']->" . $action . "\t" . $this->request->getRequestUri() . "\t" . $this->request->getFullUri(), time());
}
$this->{$action}();
} else {
throw new Exception('That action is not defined in the controller.');
}
}