public function addChannel($code, $name, $logo = NULL, $offline = NULL, $description = NULL, array $params = [])
{
if (isset($this->channels[$code])) {
throw new InvalidArgumentException("Channel with name '{$code}' is already defined.");
}
$this->channels[$code] = (object) array_merge($params, ['code' => $code, 'name' => $name, 'logo' => $logo, 'offline' => $offline, 'description' => $description]);
return $this;
}