_modelMapper = new Domain51_Model_Mapper_Sql($name); $this->_initView(); } public function dispatch($spec) { // todo: account for strings $path = $spec->path; $action = 'action' . ucfirst(strtolower(array_shift($path))); return call_user_func_array(array($this, $action), $path); } protected function actionView($id) { $model = $this->_modelMapper->fetchById($id); $this->_view->model = $model; return $this->_view->fetch('view.html'); } } ?>