Файл: vendor/whichbrowser/parser/src/Analyser/Header/Useragent/Device/Phone.php
Строк: 35
<?php
namespace WhichBrowserAnalyserHeaderUseragentDevice;
use WhichBrowserConstants;
use WhichBrowserData;
use WhichBrowserModelVersion;
trait Phone
{
private function detectPhone($ua)
{
$this->detectNttTeless($ua);
$this->detectSnom($ua);
}
/* NTT Teless */
private function detectNttTeless($ua)
{
if (preg_match('/Product=NTT/Teless/ui', $ua, $match)) {
$this->data->device->manufacturer = 'NTT';
$this->data->device->model = 'Teless';
$this->data->device->identified |= ConstantsId::MATCH_UA;
$this->data->device->type = ConstantsDeviceType::MOBILE;
$this->data->device->subtype = ConstantsDeviceSubType::DESKTOP;
}
}
/* SNOM */
private function detectSnom($ua)
{
if (preg_match('/snom(.+)-SIP/ui', $ua, $match)) {
$this->data->device->manufacturer = 'SNOM';
$this->data->device->model = $match[1] . ' IP Telephone';
$this->data->device->identified |= ConstantsId::MATCH_UA;
$this->data->device->type = ConstantsDeviceType::MOBILE;
$this->data->device->subtype = ConstantsDeviceSubType::DESKTOP;
}
}
}