1 | <?php |
||
49 | class IniLoader |
||
50 | { |
||
51 | const PHP_INI_LITE = 'Lite_PHP_BrowscapINI'; |
||
52 | const PHP_INI_FULL = 'Full_PHP_BrowscapINI'; |
||
53 | const PHP_INI = 'PHP_BrowscapINI'; |
||
54 | |||
55 | /** |
||
56 | * Options for update capabilities |
||
57 | * |
||
58 | * $remoteTimeUrl: The location to use to check out if a new version of the |
||
59 | * browscap.ini file is available. |
||
60 | * $remoteIniUrl: The location from which download the ini file. |
||
61 | * The placeholder for the file should be represented by a %s. |
||
62 | * $timeout: The timeout for the requests. |
||
63 | */ |
||
64 | private $remoteIniUrl = 'http://browscap.org/stream?q=%q'; |
||
65 | private $remoteTimeUrl = 'http://browscap.org/version'; |
||
66 | private $remoteVersionUrl = 'http://browscap.org/version-number'; |
||
67 | |||
68 | /** |
||
69 | * @var string |
||
70 | */ |
||
71 | private $remoteFilename = self::PHP_INI; |
||
72 | |||
73 | /** |
||
74 | * sets the name of the local ini file |
||
75 | * |
||
76 | * @param string $name the file name |
||
77 | * |
||
78 | * @throws \BrowscapPHP\Helper\Exception |
||
79 | * @return \BrowscapPHP\Helper\IniLoader |
||
80 | */ |
||
81 | 7 | public function setRemoteFilename($name = null) |
|
94 | |||
95 | /** |
||
96 | * returns the of the remote location for updating the ini file |
||
97 | * |
||
98 | * @return string |
||
99 | */ |
||
100 | 5 | public function getRemoteIniUrl() |
|
104 | |||
105 | /** |
||
106 | * returns the of the remote location for checking the version of the ini file |
||
107 | * |
||
108 | * @return string |
||
109 | */ |
||
110 | 1 | public function getRemoteTimeUrl() |
|
114 | |||
115 | /** |
||
116 | * returns the of the remote location for checking the version of the ini file |
||
117 | * |
||
118 | * @return string |
||
119 | */ |
||
120 | 4 | public function getRemoteVersionUrl() |
|
124 | } |
||
125 |