function setChannels($channels, $merge = false)
    {
        if (!is_array($channels)) {
            return false;
        }

        if ($merge) {
            $this->_channels = array_merge($this->_channels, $channels);
        } else {
            $this->_channels = $channels;
        }

        foreach ($channels as $channel) {
            $channel = strtolower($channel);
            if ($channel == 'pear.php.net') {
                continue;
            }

            foreach ($this->layers as $layer) {
                if (!isset($this->configuration[$layer]['__channels'])) {
                    $this->configuration[$layer]['__channels'] = array();
                }
                if (!isset($this->configuration[$layer]['__channels'][$channel])
                      || !is_array($this->configuration[$layer]['__channels'][$channel])) {
                    $this->configuration[$layer]['__channels'][$channel] = array();
                }
            }
        }

        return true;
    }
function setChannels($channels, $merge = false)
    {
        if (!is_array($channels)) {
            return false;
        }

        if ($merge) {
            $this->_channels = array_merge($this->_channels, $channels);
        } else {
            $this->_channels = $channels;
        }

        foreach ($channels as $channel) {
            $channel = strtolower($channel);
            if ($channel == 'pear.php.net') {
                continue;
            }

            foreach ($this->layers as $layer) {
                if (!isset($this->configuration[$layer]['__channels'])) {
                    $this->configuration[$layer]['__channels'] = array();
                }
                if (!isset($this->configuration[$layer]['__channels'][$channel])
                      || !is_array($this->configuration[$layer]['__channels'][$channel])) {
                    $this->configuration[$layer]['__channels'][$channel] = array();
                }
            }
        }

        return true;
    }
function setChannels ( $ channels , $ merge = false ) { if ( ! is_array ( $ channels ) ) { return false ; } if ( $ merge ) { $ this -> _channels = array_merge ( $ this -> _channels , $ channels ) ; } else { $ this -> _channels = $ channels ; } foreach ( $ channels as $ channel ) { $ channel = strtolower ( $ channel ) ; if ( $ channel == 'pear.php.net' ) { continue ; } foreach ( $ this -> layers as $ layer ) { if ( ! isset ( $ this -> configuration [ $ layer ] [ '__channels' ] ) ) { $ this -> configuration [ $ layer ] [ '__channels' ] = array ( ) ; } if ( ! isset ( $ this -> configuration [ $ layer ] [ '__channels' ] [ $ channel ] ) || ! is_array ( $ this -> configuration [ $ layer ] [ '__channels' ] [ $ channel ] ) ) { $ this -> configuration [ $ layer ] [ '__channels' ] [ $ channel ] = array ( ) ; } } } return true ; }
Set the list of channels.

This should be set via a call to {@link PEAR_Registry::listChannels()}
@param array
@param bool
@return bool success of operation
Set the list of channels .