1 | <?php |
||
9 | final class IniLoader implements IniLoaderInterface |
||
10 | { |
||
11 | /** |
||
12 | * The location from which download the ini file. The placeholder for the file should be represented by a %s. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | private const REMOTE_INI_URI = 'http://browscap.org/stream?q=%q'; |
||
17 | |||
18 | /** |
||
19 | * The location to use to check out if a new version of the browscap.ini file is available. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | private const REMOTE_TIME_URI = 'http://browscap.org/version'; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private const REMOTE_VERSION_URI = 'http://browscap.org/version-number'; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | private $remoteFilename = IniLoaderInterface::PHP_INI; |
||
34 | |||
35 | /** |
||
36 | * sets the name of the local ini file |
||
37 | * |
||
38 | * @param string $name the file name |
||
39 | * |
||
40 | * @throws \BrowscapPHP\Helper\Exception |
||
41 | */ |
||
42 | 2 | public function setRemoteFilename(string $name) : void |
|
53 | |||
54 | /** |
||
55 | * returns the of the remote location for updating the ini file |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | 1 | public function getRemoteIniUrl() : string |
|
63 | |||
64 | /** |
||
65 | * returns the of the remote location for checking the version of the ini file |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | 1 | public function getRemoteTimeUrl() : string |
|
73 | |||
74 | /** |
||
75 | * returns the of the remote location for checking the version of the ini file |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | public function getRemoteVersionUrl() : string |
||
83 | } |
||
84 |