look for line 622 in reqeuest.php:
// These are accessible as public vars and can be overloaded unset($params['controller'], $params['action'], $params['directory']); // Params cannot be changed once matched $this->_params = $params;
why line 695 cannot return controller :
public function param($key = NULL, $default = NULL) { return $this->_params[$key]; }
so you get the controller $controller = Request::instance()->controller; or $controller = $this->request->controller; if you are inside the controller
source share