37 $this->configByChannel = $config;
45 $channelKey = isset( $this->configByChannel[$channel] )
49 if ( !isset( $this->relayers[$channelKey] ) ) {
50 if ( !isset( $this->configByChannel[$channelKey] ) ) {
51 throw new UnexpectedValueException(
"No config for '$channelKey'" );
54 $config = $this->configByChannel[$channelKey];
55 $class = $config[
'class'];
57 $this->relayers[$channelKey] =
new $class( $config );
60 return $this->relayers[$channelKey];