blob: af0519199554094ca4791b17424132b523697255 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik\Plugins\DevicesDetection;
require_once PIWIK_INCLUDE_PATH . '/plugins/DevicesDetection/functions.php';
class Visitor
{
private $details = array();
public function __construct($details)
{
$this->details = $details;
}
public function getDeviceType()
{
return getDeviceTypeLabel($this->details['config_device_type']);
}
public function getDeviceTypeIcon()
{
return getDeviceTypeLogo($this->details['config_device_type']);
}
public function getDeviceBrand()
{
return getDeviceBrandLabel($this->details['config_device_brand']);
}
public function getDeviceModel()
{
return $this->details['config_device_model'];
}
public function getOperatingSystemCode()
{
return $this->details['config_os'];
}
public function getOperatingSystem()
{
return getOsFullName($this->details['config_os'] . ";" . $this->details['config_os_version']);
}
public function getOperatingSystemName()
{
return getOsFullName($this->details['config_os']);
}
public function getOperatingSystemVersion()
{
return $this->details['config_os_version'];
}
public function getOperatingSystemIcon()
{
return getOsLogo($this->details['config_os']);
}
public function getBrowserEngineDescription()
{
return getBrowserEngineName($this->getBrowserEngine());
}
public function getBrowserEngine()
{
return $this->details['config_browser_engine'];
}
public function getBrowserCode()
{
return $this->details['config_browser_name'];
}
public function getBrowserVersion()
{
return $this->details['config_browser_version'];
}
public function getBrowser()
{
return getBrowserNameWithVersion($this->details['config_browser_name'] . ";" . $this->details['config_browser_version']);
}
public function getBrowserName()
{
return getBrowserName($this->details['config_browser_name'] . ";" . $this->details['config_browser_version']);
}
public function getBrowserIcon()
{
return getBrowserLogo($this->details['config_browser_name'] . ";" . $this->details['config_browser_version']);
}
}
|