Skip to content

Commit

Permalink
Added postDispatch and preDispatch support
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxel committed Nov 18, 2010
1 parent e2a77b8 commit f34425c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Bee/Bootstrap.php
Expand Up @@ -95,7 +95,9 @@ public function initController(){
$controller->setRequestHandler($requestHandler);
$controller->setView($this->_view);

$controller->preDispatch();
call_user_func(array($controller, $action), $actionArgs);
$controller->postDispatch();

$controller->renderView();

Expand Down
5 changes: 3 additions & 2 deletions Bee/Controller/Abstract.php
Expand Up @@ -143,6 +143,7 @@ function callAdminMethod($caller){
return $this->admin($caller);
}

//this should be implemented on all controllers
abstract function index();
function preDispatch(){}
function postDispatch(){}
function index(){}
}

0 comments on commit f34425c

Please sign in to comment.