src/Routes/UrlManager.php
public function getBaseUrl($app = null)
    {
        if ($app !== null && $app instanceof RequestApplicationInterface) {
            return $app->reqHelper->getBaseUrl();
        }
        if ($this->_baseUrl === null) {
            throw new InvalidConfigException('Please configure UrlManager::baseUrl correctly if you are running a console application.');
        }
        return $this->_baseUrl;
    }
public function getBaseUrl($app = null)
    {
        if ($app !== null && $app instanceof RequestApplicationInterface) {
            return $app->reqHelper->getBaseUrl();
        }
        if ($this->_baseUrl === null) {
            throw new InvalidConfigException('Please configure UrlManager::baseUrl correctly if you are running a console application.');
        }
        return $this->_baseUrl;
    }
Getter for $baseUrl
@param RequestApplicationInterface|null $app
@return string