Appliance.php 638 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace WhichBrowser\Analyser\Header\Useragent\Device;
  3. use WhichBrowser\Constants;
  4. trait Appliance
  5. {
  6. private function detectAppliance($ua)
  7. {
  8. $this->detectIOpener($ua);
  9. }
  10. /* Netpliance i-Opener */
  11. private function detectIOpener($ua)
  12. {
  13. if (preg_match('/I-Opener [0-9.]+; Netpliance/u', $ua)) {
  14. $this->data->os->reset();
  15. $this->data->device->setIdentification([
  16. 'manufacturer' => 'Netpliance',
  17. 'model' => 'i-Opener',
  18. 'type' => Constants\DeviceType::DESKTOP
  19. ]);
  20. }
  21. }
  22. }