/** * Parse module, action and args from uri * * @param Uri $uri * @return void */ private function _parseFromUri(Uri $uri) { Log::debug('{Controller->_parseFromUri()} ' . $uri->getUri(false)); if ($uri->nbSegments() === 0) { Error::showConfigurationError(); } // load asset if exists $this->_loadAsset(); $this->_module = strtolower($uri->segment(1)); $this->_action = ucfirst_last($uri->segment(2, 'index')); $this->_args = $uri->segmentsSlice(3); }
/** * Get base url including schema, host and port (if non-standard). * * @return string */ public function getBaseUrl() { return rtrim($this->schemaHost->getSchemaAndHttpHost() . $this->uri->getUri(), '/'); }