1 | <?php |
||
24 | class UserAgent |
||
25 | { |
||
26 | /** |
||
27 | * @var OperatingSystem |
||
28 | */ |
||
29 | private $operatingSystem; |
||
30 | |||
31 | /** |
||
32 | * @var WebClient |
||
33 | */ |
||
34 | private $webClient; |
||
35 | |||
36 | 15 | public function __construct(OperatingSystem $operatingSystem, WebClient $webClient) |
|
41 | |||
42 | 3 | public function os(): string |
|
46 | |||
47 | /** |
||
48 | * @param string|OperatingSystem $operatingSystem |
||
49 | * @return bool |
||
50 | */ |
||
51 | 2 | public function isOs($operatingSystem): bool |
|
55 | |||
56 | 3 | public function webClient(): string |
|
60 | |||
61 | /** |
||
62 | * @param string|WebClient $webClient |
||
63 | * @return boolean |
||
64 | */ |
||
65 | 2 | public function isWebClient($webClient): bool |
|
69 | |||
70 | 1 | public function webClientVersion(): string |
|
74 | |||
75 | 2 | public function isWebClientVersion(string $webClientVersion): bool |
|
79 | |||
80 | 2 | public function isWebClientVersionBetween(string $lowerVersion, string $greaterVersion): bool |
|
84 | } |
||
85 |