kind === self::CAST ? ($this->model !== '' ? $this->model : 'Google Cast') : 'DLNA'; return $this->name . ' (' . $what . ')'; } /** What it can do: Cast shows a page (custom receiver) or plays; DLNA only plays. */ public function canShowPage(): bool { return $this->kind === self::CAST; } /** @return array */ public function toArray(): array { return ['kind' => $this->kind, 'id' => $this->id, 'name' => $this->name, 'model' => $this->model, 'host' => $this->host, 'port' => $this->port, 'label' => $this->label()]; } }