1 | <?php |
||
10 | trait Browser |
||
11 | { |
||
12 | /** |
||
13 | * Get client ip-address |
||
14 | * |
||
15 | * @return null|string User ip-address |
||
16 | */ |
||
17 | public static function getClientIpAddress($fallbackReturn = null) |
||
35 | |||
36 | /** |
||
37 | * Get client operating system |
||
38 | * |
||
39 | * NOTICE: HTTP_USER_AGENT is easily spoofed. Don't trust this data. |
||
40 | * |
||
41 | * @used-by: Holt45::kbdSymbol() |
||
42 | * |
||
43 | * @return null|string User operating system(win|mac|linux) |
||
44 | */ |
||
45 | public static function getClientOperatingSystem() |
||
61 | |||
62 | /** |
||
63 | * Get client browser |
||
64 | * |
||
65 | * NOTICE: HTTP_USER_AGENT is easily spoofed. Don't trust this data. |
||
66 | * |
||
67 | * @return null|string User browser(Internet Explorer|Camino|Firefox|Safari|Chrome|Konqueror|Opera) |
||
68 | */ |
||
69 | public static function getClientBrowser() |
||
98 | |||
99 | |||
100 | /** |
||
101 | * Check if browser is Google Chrome and not one of the browsers derived from Google Chrome. |
||
102 | * |
||
103 | * NOTICE: HTTP_USER_AGENT is easily spoofed. Don't trust this data. |
||
104 | * |
||
105 | * @return bool |
||
106 | */ |
||
107 | public static function isClientBrowserGoogleChrome() |
||
119 | } |
||
120 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.