function addFunction($type, $version, $name = '', $mirror = false)
    {
        if ($mirror) {
            return $this->addMirrorFunction($mirror, $type, $version, $name);
        }

        $set = array('attribs' => array('version' => $version), '_content' => $name);
        if (!isset($this->_channelInfo['servers']['primary'][$type]['function'])) {
            if (!isset($this->_channelInfo['servers'])) {
                $this->_channelInfo['servers'] = array('primary' =>
                    array($type => array()));
            } elseif (!isset($this->_channelInfo['servers']['primary'])) {
                $this->_channelInfo['servers']['primary'] = array($type => array());
            }

            $this->_channelInfo['servers']['primary'][$type]['function'] = $set;
            $this->_isValid = false;
            return true;
        } elseif (!isset($this->_channelInfo['servers']['primary'][$type]['function'][0])) {
            $this->_channelInfo['servers']['primary'][$type]['function'] = array(
                $this->_channelInfo['servers']['primary'][$type]['function']);
        }

        $this->_channelInfo['servers']['primary'][$type]['function'][] = $set;
        return true;
    }
function addFunction($type, $version, $name = '', $mirror = false)
    {
        if ($mirror) {
            return $this->addMirrorFunction($mirror, $type, $version, $name);
        }

        $set = array('attribs' => array('version' => $version), '_content' => $name);
        if (!isset($this->_channelInfo['servers']['primary'][$type]['function'])) {
            if (!isset($this->_channelInfo['servers'])) {
                $this->_channelInfo['servers'] = array('primary' =>
                    array($type => array()));
            } elseif (!isset($this->_channelInfo['servers']['primary'])) {
                $this->_channelInfo['servers']['primary'] = array($type => array());
            }

            $this->_channelInfo['servers']['primary'][$type]['function'] = $set;
            $this->_isValid = false;
            return true;
        } elseif (!isset($this->_channelInfo['servers']['primary'][$type]['function'][0])) {
            $this->_channelInfo['servers']['primary'][$type]['function'] = array(
                $this->_channelInfo['servers']['primary'][$type]['function']);
        }

        $this->_channelInfo['servers']['primary'][$type]['function'][] = $set;
        return true;
    }
function addFunction ( $ type , $ version , $ name = '' , $ mirror = false ) { if ( $ mirror ) { return $ this -> addMirrorFunction ( $ mirror , $ type , $ version , $ name ) ; } $ set = array ( 'attribs' => array ( 'version' => $ version ) , '_content' => $ name ) ; if ( ! isset ( $ this -> _channelInfo [ 'servers' ] [ 'primary' ] [ $ type ] [ 'function' ] ) ) { if ( ! isset ( $ this -> _channelInfo [ 'servers' ] ) ) { $ this -> _channelInfo [ 'servers' ] = array ( 'primary' => array ( $ type => array ( ) ) ) ; } elseif ( ! isset ( $ this -> _channelInfo [ 'servers' ] [ 'primary' ] ) ) { $ this -> _channelInfo [ 'servers' ] [ 'primary' ] = array ( $ type => array ( ) ) ; } $ this -> _channelInfo [ 'servers' ] [ 'primary' ] [ $ type ] [ 'function' ] = $ set ; $ this -> _isValid = false ; return true ; } elseif ( ! isset ( $ this -> _channelInfo [ 'servers' ] [ 'primary' ] [ $ type ] [ 'function' ] [ 0 ] ) ) { $ this -> _channelInfo [ 'servers' ] [ 'primary' ] [ $ type ] [ 'function' ] = array ( $ this -> _channelInfo [ 'servers' ] [ 'primary' ] [ $ type ] [ 'function' ] ) ; } $ this -> _channelInfo [ 'servers' ] [ 'primary' ] [ $ type ] [ 'function' ] [ ] = $ set ; return true ; }
Add a protocol to the provides section
@param string protocol type
@param string protocol version
@param string protocol name, if any
@param string mirror name, if this is a mirror's protocol
@return bool
Add a protocol to the provides section