1 | <?php |
||
13 | final class Ini implements ParserInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var Helper\GetPatternInterface |
||
17 | */ |
||
18 | private $patternHelper; |
||
19 | |||
20 | /** |
||
21 | * @var Helper\GetDataInterface |
||
22 | */ |
||
23 | private $dataHelper; |
||
24 | |||
25 | /** |
||
26 | * Formatter to use |
||
27 | * |
||
28 | * @var \BrowscapPHP\Formatter\FormatterInterface |
||
29 | */ |
||
30 | private $formatter; |
||
31 | |||
32 | /** |
||
33 | * class constructor |
||
34 | * |
||
35 | * @param \BrowscapPHP\Parser\Helper\GetPatternInterface $patternHelper |
||
36 | * @param \BrowscapPHP\Parser\Helper\GetDataInterface $dataHelper |
||
37 | * @param \BrowscapPHP\Formatter\FormatterInterface $formatter |
||
38 | */ |
||
39 | public function __construct( |
||
48 | |||
49 | /** |
||
50 | * Gets the browser data formatr for the given user agent |
||
51 | * (or null if no data avaailble, no even the default browser) |
||
52 | * |
||
53 | * @param string $userAgent |
||
54 | * |
||
55 | * @throws \UnexpectedValueException |
||
56 | * |
||
57 | * @return FormatterInterface|null |
||
58 | */ |
||
59 | public function getBrowser(string $userAgent) : ?FormatterInterface |
||
108 | } |
||
109 |