]); } /* Planetweb */ if (preg_match('/Planetweb\/v?([0-9.]*)/u', $ua, $match)) { $this->data->browser->name = 'Planetweb'; $this->data->browser->version = new Version([ 'value' => $match[1] ]); $this->data->browser->type = Constants\BrowserType::BROWSER; if (preg_match('/Dreamcast/u', $ua, $match)) { $this->data->device->setIdentification([ 'manufacturer' => 'Sega', 'model' => 'Dreamcast', 'type' => Constants\DeviceType::GAMING, 'subtype' => Constants\DeviceSubType::CONSOLE ]); } if (preg_match('/SPS/u', $ua, $match)) { $this->data->device->setIdentification([ 'manufacturer' => 'Sony', 'model' => 'Playstation 2', 'type' => Constants\DeviceType::GAMING, 'subtype' => Constants\DeviceSubType::CONSOLE ]); } } } private function detectRemainingBrowsers($ua) { if ($data = Data\Applications::identifyBrowser($ua)) { $this->data->browser->set($data['browser']); if (!empty($data['device'])) { $this->data->device->set($data['device']); } } } private function detectWapBrowsers($ua) { if (!preg_match('/(Dorado|MAUI)/ui', $ua, $match)) { return; } if (preg_match('/Browser\/Dorado([0-9.]*)/ui', $ua, $match)) { $this->data->browser->name = 'Dorado WAP'; $this->data->browser->type = Constants\BrowserType::BROWSER; $this->data->browser->version = new Version([ 'value' => $match[1], 'details' => 2 ]); } if (preg_match('/Dorado WAP-Browser\/([0-9.]*)/ui', $ua, $match)) { $this->data->browser->name = 'Dorado WAP'; $this->data->browser->type = Constants\BrowserType::BROWSER; $this->data->browser->version = new Version([ 'value' => $match[1], 'details' => 2 ]); } if (preg_match('/MAUI[ _]WAP[ _]Browser(?:\/([0-9.]*))?/ui', $ua, $match)) { $this->data->browser->name = 'MAUI WAP'; $this->data->browser->type = Constants\BrowserType::BROWSER; if (isset($match[1])) { $this->data->browser->version = new Version([ 'value' => $match[1] ]); } } if (preg_match('/WAP Browser\/MAUI/ui', $ua, $match)) { $this->data->browser->name = 'MAUI WAP'; $this->data->browser->type = Constants\BrowserType::BROWSER; } } }