1 | <?php |
||
9 | final class IniLoader |
||
10 | { |
||
11 | const PHP_INI_LITE = 'Lite_PHP_BrowscapINI'; |
||
12 | const PHP_INI_FULL = 'Full_PHP_BrowscapINI'; |
||
13 | const PHP_INI = 'PHP_BrowscapINI'; |
||
14 | |||
15 | /** |
||
16 | * The location from which download the ini file. The placeholder for the file should be represented by a %s. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | private $remoteIniUrl = 'http://browscap.org/stream?q=%q'; |
||
21 | |||
22 | /** |
||
23 | * The location to use to check out if a new version of the browscap.ini file is available. |
||
24 | * @var string |
||
25 | */ |
||
26 | private $remoteTimeUrl = 'http://browscap.org/version'; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $remoteVersionUrl = 'http://browscap.org/version-number'; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | private $remoteFilename = self::PHP_INI; |
||
37 | |||
38 | /** |
||
39 | * sets the name of the local ini file |
||
40 | * |
||
41 | * @param string $name the file name |
||
42 | * |
||
43 | * @throws \BrowscapPHP\Helper\Exception |
||
44 | * @return \BrowscapPHP\Helper\IniLoader |
||
45 | */ |
||
46 | 3 | public function setRemoteFilename(string $name) |
|
59 | |||
60 | /** |
||
61 | * returns the of the remote location for updating the ini file |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | 1 | public function getRemoteIniUrl() : string |
|
69 | |||
70 | /** |
||
71 | * returns the of the remote location for checking the version of the ini file |
||
72 | * |
||
73 | * @return string |
||
74 | */ |
||
75 | 1 | public function getRemoteTimeUrl() : string |
|
79 | |||
80 | /** |
||
81 | * returns the of the remote location for checking the version of the ini file |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | public function getRemoteVersionUrl() : string |
||
89 | } |
||
90 |