1 | <?php |
||
19 | class UserAgent implements StartOfGroupInterface, GroupMemberInterface |
||
20 | { |
||
21 | /** |
||
22 | * When the asterisk is used, than all the user-agents are included. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | const ALL_AGENTS = '*'; |
||
27 | |||
28 | /** |
||
29 | * Directive value. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | private $value = ''; |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function __construct(string $raw) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public static function getField(): string |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function getValue(): string |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | public function __toString(): string |
||
70 | |||
71 | /** |
||
72 | * Checks if a user-agent is matching current user agent. |
||
73 | * |
||
74 | * @param string $userAgent |
||
75 | * |
||
76 | * @return bool |
||
77 | */ |
||
78 | public function isMatching(string $userAgent): bool |
||
85 | } |
||
86 |