function getBaseURL($resourceType, $mirror = false)
    {
        if ($mirror == $this->_channelInfo['name']) {
            $mirror = false;
        }

        if ($mirror) {
            $mir = $this->getMirror($mirror);
            if (!$mir) {
                return false;
            }

            $rest = $mir['rest'];
        } else {
            $rest = $this->_channelInfo['servers']['primary']['rest'];
        }

        if (!isset($rest['baseurl'][0])) {
            $rest['baseurl'] = array($rest['baseurl']);
        }

        foreach ($rest['baseurl'] as $baseurl) {
            if (strtolower($baseurl['attribs']['type']) == strtolower($resourceType)) {
                return $baseurl['_content'];
            }
        }

        return false;
    }
function getBaseURL($resourceType, $mirror = false)
    {
        if ($mirror == $this->_channelInfo['name']) {
            $mirror = false;
        }

        if ($mirror) {
            $mir = $this->getMirror($mirror);
            if (!$mir) {
                return false;
            }

            $rest = $mir['rest'];
        } else {
            $rest = $this->_channelInfo['servers']['primary']['rest'];
        }

        if (!isset($rest['baseurl'][0])) {
            $rest['baseurl'] = array($rest['baseurl']);
        }

        foreach ($rest['baseurl'] as $baseurl) {
            if (strtolower($baseurl['attribs']['type']) == strtolower($resourceType)) {
                return $baseurl['_content'];
            }
        }

        return false;
    }
function getBaseURL ( $ resourceType , $ mirror = false ) { if ( $ mirror == $ this -> _channelInfo [ 'name' ] ) { $ mirror = false ; } if ( $ mirror ) { $ mir = $ this -> getMirror ( $ mirror ) ; if ( ! $ mir ) { return false ; } $ rest = $ mir [ 'rest' ] ; } else { $ rest = $ this -> _channelInfo [ 'servers' ] [ 'primary' ] [ 'rest' ] ; } if ( ! isset ( $ rest [ 'baseurl' ] [ 0 ] ) ) { $ rest [ 'baseurl' ] = array ( $ rest [ 'baseurl' ] ) ; } foreach ( $ rest [ 'baseurl' ] as $ baseurl ) { if ( strtolower ( $ baseurl [ 'attribs' ] [ 'type' ] ) == strtolower ( $ resourceType ) ) { return $ baseurl [ '_content' ] ; } } return false ; }
Get the URL to access a base resource.

Hyperlinks in the returned xml will be used to retrieve the proper information
needed.  This allows extreme extensibility and flexibility in implementation
@param string Resource Type to retrieve
Get the URL to access a base resource .