public function getChannel($id){
        if(!isset($this->channels[$id])){
            throw new InvalidParamException("Unknown channel '{$id}'.");
        }

        if (!is_object($this->channels[$id])) {
            $this->channels[$id] = $this->createChannel($id, $this->channels[$id]);
        }

        return $this->channels[$id];
    }
public function getChannel($id){
        if(!isset($this->channels[$id])){
            throw new InvalidParamException("Unknown channel '{$id}'.");
        }

        if (!is_object($this->channels[$id])) {
            $this->channels[$id] = $this->createChannel($id, $this->channels[$id]);
        }

        return $this->channels[$id];
    }
public function getChannel ( $ id ) { if ( ! isset ( $ this -> channels [ $ id ] ) ) { throw new InvalidParamException ( "Unknown channel '{$id}'." ) ; } if ( ! is_object ( $ this -> channels [ $ id ] ) ) { $ this -> channels [ $ id ] = $ this -> createChannel ( $ id , $ this -> channels [ $ id ] ) ; } return $ this -> channels [ $ id ] ; }
Gets the channel instance

@param string $id the id of the channel
@return Channel|null return the channel
@throws InvalidParamException
Gets the channel instance