this->data->device->identified |= Constants\Id::MATCH_UA; } } /* PSION */ private function detectPsion($ua) { if (preg_match('/Psion Cpw\//iu', $ua, $match)) { $this->data->browser->name = 'WAP Browser'; $this->data->browser->version = null; $this->data->browser->type = Constants\BrowserType::BROWSER; $this->data->os->name = 'EPOC'; $this->data->os->family = new Family([ 'name' => 'Symbian' ]); $this->data->device->manufacturer = 'Psion'; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->type = Constants\DeviceType::PDA; if (preg_match('/\(([A-Z0-9]+)\)/u', $ua, $match)) { switch ($match[1]) { case 'S5': $this->data->device->model = 'Series 5mx'; break; case 'S7': $this->data->device->model = 'Series 7'; break; case 'RV': $this->data->device->model = 'Revo'; break; } } } } /* Sony Mylo */ private function detectSonyMylo($ua) { if (preg_match('/SONY\/COM([0-9])/ui', $ua, $match)) { $this->data->device->manufacturer = 'Sony'; $this->data->device->model = 'Mylo ' . $match[1]; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->type = Constants\DeviceType::PDA; $this->data->os->reset(); if (preg_match('/Qt embedded/ui', $ua, $match)) { $this->data->os->name = 'Qtopia'; } } } /* Sony Airboard */ private function detectSonyAirboard($ua) { if (preg_match('/SONY\/airboard\/IDT-([A-Z0-9]+)/ui', $ua, $match)) { $this->data->device->manufacturer = 'Sony'; $this->data->device->model = 'Airboard ' . $match[1]; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->type = Constants\DeviceType::PDA; } if (preg_match('/LocationFreeTV; Airboard\/(LF-[A-Z0-9]+)/ui', $ua, $match)) { $this->data->device->manufacturer = 'Sony'; $this->data->device->model = 'Airboard ' . $match[1]; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->type = Constants\DeviceType::PDA; } } /* Sharp Zaurus */ private function detectSharpZaurus($ua) { if (preg_match('/sharp pda browser\/([0-9\.]+)/ui', $ua, $match)) { $this->data->device->manufacturer = 'Sharp'; $this->data->device->model = 'Zaurus'; $this->data->device->type = Constants\DeviceType::PDA; if (preg_match('/\(([A-Z0-9\-]+)\/[0-9\.]+\)/ui', $ua, $match)) { $this->data->device->model = 'Zaurus ' . $match[1]; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->generic = false; } } if (preg_match('/\(PDA; (SL-[A-Z][0-9]+)\/[0-9\.]/ui', $ua, $match)) { $this->data->device->manufacturer = 'Sharp'; $this->data->device->model = 'Zaurus ' . $match[1]; $this->data->device->type = Constants\DeviceType::PDA; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->generic = false; } } /* Sharp Shoin (Word Processor) */ private function detectSharpShoin($ua) { if (preg_match('/sharp wd browser\/([0-9\.]+)/ui', $ua, $match)) { $this->data->device->manufacturer = 'Sharp'; $this->data->device->model = 'Mobile Shoin'; $this->data->device->type = Constants\DeviceType::PDA; if (preg_match('/\(([A-Z0-9\-]+)\/[0-9\.]+\)/ui', $ua, $match)) { $this->data->device->model = 'Mobile Shoin ' . $match[1]; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->generic = false; } } } /* Panasonic POCKET・E */ private function detectPanasonicPocketE($ua) { if (preg_match('/Product\=Panasonic\/POCKET-E/ui', $ua, $match)) { $this->data->device->manufacturer = 'Panasonic'; $this->data->device->model = 'POCKET・E'; $this->data->device->type = Constants\DeviceType::PDA; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->generic = false; } } /* Fujitsu OASYS */ private function detectFujitsuOasys($ua) { if (preg_match('/Fujitsu; OASYS/ui', $ua, $match)) { $this->data->device->manufacturer = 'Fujitsu'; $this->data->device->model = 'OASYS'; $this->data->device->type = Constants\DeviceType::PDA; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->generic = false; if (preg_match('/eNavigator/ui', $ua, $match)) { $this->data->browser->name = 'eNavigator'; $this->data->browser->version = null; $this->data->browser->type = Constants\BrowserType::BROWSER; } } } /* PetitWeb */ private function detectNttPetitWeb($ua) { if (preg_match('/Product\=NTT\/(PI-[0-9]+)/ui', $ua, $match)) { $this->data->device->manufacturer = 'NTT'; $this->data->device->model = 'PetitWeb ' . $match[1]; $this->data->device->type = Constants\DeviceType::PDA; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->generic = false; } } }