@@ 34-42 (lines=9) @@ | ||
31 | * @param UserAgent $userAgent |
|
32 | * @return bool |
|
33 | */ |
|
34 | private static function checkIpad(Device $device, UserAgent $userAgent) |
|
35 | { |
|
36 | if (stripos($userAgent->getUserAgentString(), 'ipad') !== false) { |
|
37 | $device->setName(Device::IPAD); |
|
38 | return true; |
|
39 | } |
|
40 | ||
41 | return false; |
|
42 | } |
|
43 | ||
44 | /** |
|
45 | * Determine if the device is iPhone. |
|
@@ 51-59 (lines=9) @@ | ||
48 | * @param UserAgent $userAgent |
|
49 | * @return bool |
|
50 | */ |
|
51 | private static function checkIphone(Device $device, UserAgent $userAgent) |
|
52 | { |
|
53 | if (stripos($userAgent->getUserAgentString(), 'iphone;') !== false) { |
|
54 | $device->setName(Device::IPHONE); |
|
55 | return true; |
|
56 | } |
|
57 | ||
58 | return false; |
|
59 | } |
|
60 | ||
61 | /** |
|
62 | * Determine if the device is Windows Phone. |