protected function getBaseUrl($withAuthentication = false)
    {
        $config = $this->getConfig();
        $baseUrl = $config['scheme'] . '://' . rtrim($config['host'], '/') . '/';

        if (isset($config['path'])) {
            $baseUrl .= trim($config['path'], '/') . '/';
        }

        if ($withAuthentication === true
            && $this->getConnector()->getListener() instanceof \Buzz\Listener\BasicAuthListener) {

            $baseUrl .= 'a/';
        }

        return $baseUrl;
    }
protected function getBaseUrl($withAuthentication = false)
    {
        $config = $this->getConfig();
        $baseUrl = $config['scheme'] . '://' . rtrim($config['host'], '/') . '/';

        if (isset($config['path'])) {
            $baseUrl .= trim($config['path'], '/') . '/';
        }

        if ($withAuthentication === true
            && $this->getConnector()->getListener() instanceof \Buzz\Listener\BasicAuthListener) {

            $baseUrl .= 'a/';
        }

        return $baseUrl;
    }
protected function getBaseUrl ( $ withAuthentication = false ) { $ config = $ this -> getConfig ( ) ; $ baseUrl = $ config [ 'scheme' ] . '://' . rtrim ( $ config [ 'host' ] , '/' ) . '/' ; if ( isset ( $ config [ 'path' ] ) ) { $ baseUrl .= trim ( $ config [ 'path' ] , '/' ) . '/' ; } if ( $ withAuthentication === true && $ this -> getConnector ( ) -> getListener ( ) instanceof \ Buzz \ Listener \ BasicAuthListener ) { $ baseUrl .= 'a/' ; } return $ baseUrl ; }
Gets the base url for all HTTP requests.

@param bool $withAuthentication If true, the authentification string will be appended. False otherwise
@return string
Gets the base url for all HTTP requests .