matchUserAgent($regex); return null !== $match; } /** * Parses the current UA and checks whether it contains ShellTv information * * @return array|null * * @throws \Exception * * @see shell_tv.yml for list of detected televisions * */ public function parse(): ?array { // only parse user agents containing fragments: {brand} shell if (!$this->isShellTv()) { return null; } parent::parse(); // always set device type to tv, even if no model/brand could be found $this->deviceType = self::DEVICE_TYPE_TV; return $this->getResult(); } }