1 | <?php |
||
32 | 1 | final class Helpers |
|
33 | { |
||
34 | /** |
||
35 | * Implement nette smart magic |
||
36 | */ |
||
37 | 1 | use Nette\SmartObject; |
|
38 | |||
39 | /** |
||
40 | * @var MobileDetect\MobileDetect |
||
41 | */ |
||
42 | private $mobileDetect; |
||
43 | |||
44 | /** |
||
45 | * @var MobileDetect\Helpers\DeviceView |
||
46 | */ |
||
47 | private $deviceView; |
||
48 | |||
49 | /** |
||
50 | * @param MobileDetect\MobileDetect $mobileDetect |
||
51 | * @param MobileDetect\Helpers\DeviceView $deviceView |
||
52 | */ |
||
53 | public function __construct( |
||
60 | |||
61 | /** |
||
62 | * @return MobileDetect\MobileDetect |
||
63 | */ |
||
64 | public function getMobileDetectService() : MobileDetect\MobileDetect |
||
68 | |||
69 | /** |
||
70 | * @return MobileDetect\Helpers\DeviceView |
||
71 | */ |
||
72 | public function getDeviceViewService() : MobileDetect\Helpers\DeviceView |
||
76 | |||
77 | /** |
||
78 | * @return bool |
||
79 | */ |
||
80 | public function isMobile() : bool |
||
84 | |||
85 | /** |
||
86 | * @return bool |
||
87 | */ |
||
88 | public function isPhone() : bool |
||
92 | |||
93 | /** |
||
94 | * @return bool |
||
95 | */ |
||
96 | public function isTablet() : bool |
||
100 | |||
101 | /** |
||
102 | * @param string $device |
||
103 | * |
||
104 | * @return bool |
||
105 | */ |
||
106 | public function isDevice(string $device) : bool |
||
110 | |||
111 | /** |
||
112 | * @param string $os |
||
113 | * |
||
114 | * @return bool |
||
115 | */ |
||
116 | public function isOs(string $os) : bool |
||
120 | |||
121 | /** |
||
122 | * @return bool |
||
123 | */ |
||
124 | public function isFullView() : bool |
||
128 | |||
129 | /** |
||
130 | * @return bool |
||
131 | */ |
||
132 | public function isMobileView() : bool |
||
136 | |||
137 | /** |
||
138 | * @return bool |
||
139 | */ |
||
140 | public function isPhoneView() : bool |
||
144 | |||
145 | /** |
||
146 | * @return bool |
||
147 | */ |
||
148 | public function isTabletView() : bool |
||
152 | |||
153 | /** |
||
154 | * @return bool |
||
155 | */ |
||
156 | public function isNotMobileView() : bool |
||
160 | } |
||
161 |