getBaseUrl()) { $requestUri = str_ireplace('//', '/', $this->_strReplaceFirst($baseUrl, '', $requestUri)); } } } $this->_requestUri = $requestUri; return $this; } /** * * get the module from the routed request * * @return string */ public function getModule() { if (!$this->_module) { $this->setModule(self::DEFAULT_MODULE); } return $this->_module; } /** * * get the name of the routed action controller * * @return string */ public function getController() { if (!$this->_controller) { $this->setController(self::DEFAULT_CONTROLLER); } return $this->_controller; } /** * * get the name of the routed controller action * * @return string */ public function getAction() { if (!$this->_action) { $this->setAction(self::DEFAULT_ACTION); } return $this->_action; } protected function _strReplaceFirst($search, $replace, $subject) { $pos = strpos($subject, $search); if ($pos !== false) { $subject = substr_replace($subject, $replace, $pos, strlen($search)); } return $subject; } }