/** * Redirect the request to another controller. * * Why this method is created anyway is to allow * deprecating old controllers and start to create new one * a quiet manner! * * The idea is to create the new controller, adding new Action there * and redirect the call throught current deprecated controller. * * @param mixed $controller */ protected function redirect($controller) { // Initialize vars. $currentFilter = current_filter(); // Remove current Action! remove_action($currentFilter, array(&$this, '_doAction')); // activate the target CTR! CJTController::getInstance($controller); // Fire the action manually. do_action($currentFilter); }
/** * put your comment there... * * @param mixed $request */ public function route($loadView = null, $request = null) { // Only loading one controller is allowed. if (!$this->controller) { // Import view class. require_once CJTOOLBOX_MVC_FRAMEWOK . '/view.inc.php'; // Instantiate controller! $this->controller = $this->onsetcontroller(CJTController::getInstance($this->controllerName, $loadView, $request, $this->overrideControllersPath, $this->overrideControllersPrefix)); } return $this->controller; }