/** * * @param DF_Web_Action $action */ public function execute_action($action) { if (!$action instanceof DF_Web_Action) { throw new DF_Error_InvalidArgumentException("action", $action, "DF_Web_Action"); } $class = $action->get_controller(); $controller = $this->controller($class); // Add the action to the stack $this->stack[] = $action; $ret = $action->execute($controller, $this); // Removing the last action from the stack after it returns array_pop($this->stack); return $ret; }