VERSION
VERSION
Current version of the class.
This is a reimplemention of Browscap by Jonathan Stoppani <st.jonathan@gmail.com>
$remoteIniUrl :
Options for auto update capabilities
$remoteVerUrl: The location to use to check out if a new version of the
browscap.ini file is available.
$remoteIniUrl: The location from which download the ini file.
The placeholder for the file should be represented by a %s.
$timeout: The timeout for the requests. $updateInterval: The update interval in seconds. $errorInterval: The next update interval in seconds in case of an error. $doAutoUpdate: Flag to disable the automatic interval based update. $updateMethod: The method to use to update the file, has to be a value of
an UPDATE_* constant, null or false.
__construct(string $cache_dir, boolean $setTimeZone = true) : \Fuman_Util_Browscap
Constructor class, checks for the existence of (and loads) the cache and if needed updated the definitions
string | $cache_dir | |
boolean | $setTimeZone |
getBrowser(string|null $user_agent = null, boolean $return_array = false) : \stdClass
Gets the information about the browser by User Agent
string|null | $user_agent | the user agent string |
boolean | $return_array | whether return an array or an object |
the object containing the browsers details. Array if
$return_array is set to true.
_updateIniFile(string $url, string $localIniPath) : boolean
Updates the local copy of the ini file (by version checking) and adapts his syntax to the PHP ini parser
string | $url | the url of the remote server |
string | $localIniPath | the path of the ini file to update |
if the ini file was updated