public function channel($name, $options = [])
    {
        if (empty($this->_channels[$name])) {
            $this->_channels[$name] = new AMQPChannel($this->connection());
            if (!empty($options['prefetchCount'])) {
                $this->_channels[$name]->setPrefetchCount((int)$options['prefetchCount']);
            }
        }

        return $this->_channels[$name];
    }
public function channel($name, $options = [])
    {
        if (empty($this->_channels[$name])) {
            $this->_channels[$name] = new AMQPChannel($this->connection());
            if (!empty($options['prefetchCount'])) {
                $this->_channels[$name]->setPrefetchCount((int)$options['prefetchCount']);
            }
        }

        return $this->_channels[$name];
    }
public function channel ( $ name , $ options = [ ] ) { if ( empty ( $ this -> _channels [ $ name ] ) ) { $ this -> _channels [ $ name ] = new AMQPChannel ( $ this -> connection ( ) ) ; if ( ! empty ( $ options [ 'prefetchCount' ] ) ) { $ this -> _channels [ $ name ] -> setPrefetchCount ( ( int ) $ options [ 'prefetchCount' ] ) ; } } return $ this -> _channels [ $ name ] ; }
Creates a new channel to communicate with an exchange or queue object

@param array $options
@return AMQPChannel
Creates a new channel to communicate with an exchange or queue object