public function channel($channelId = null)
    {
        if (isset($this->channels[$channelId])) {
            return $this->channels[$channelId];
        } else {
            $channelId = $channelId ? : $this->getFreeChannelId();
            $ch = new Channel($this->connection, $channelId);
            return $this->channels[$channelId] = $ch;
        }
    }
public function channel($channelId = null)
    {
        if (isset($this->channels[$channelId])) {
            return $this->channels[$channelId];
        } else {
            $channelId = $channelId ? : $this->getFreeChannelId();
            $ch = new Channel($this->connection, $channelId);
            return $this->channels[$channelId] = $ch;
        }
    }
public function channel ( $ channelId = null ) { if ( isset ( $ this -> channels [ $ channelId ] ) ) { return $ this -> channels [ $ channelId ] ; } else { $ channelId = $ channelId ? : $ this -> getFreeChannelId ( ) ; $ ch = new Channel ( $ this -> connection , $ channelId ) ; return $ this -> channels [ $ channelId ] = $ ch ; } }
Fetch a Channel object identified by the numeric channel_id, or
create that object if it doesn't already exist.

@param string|null $channelId

@return \AMQP\Channel
Fetch a Channel object identified by the numeric channel_id or create that object if it doesn t already exist .