Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+14 -4
View File
@@ -52,6 +52,11 @@ class _Useragent
*/
public $useragent = NULL;
/**
* @brief Store parsed agents
*/
protected static $parsedAgents = array();
/**
* Constructor
*
@@ -72,11 +77,16 @@ class _Useragent
public static function parse( $userAgent=NULL )
{
$userAgent = $userAgent ?: ( ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? $_SERVER['HTTP_USER_AGENT'] : '' );
if ( ! isset( static::$parsedAgents[ $userAgent ] ) )
{
$obj = new static( $userAgent );
$obj->parseUserAgent();
$obj = new static( $userAgent );
$obj->parseUserAgent();
return $obj;
static::$parsedAgents[ $userAgent ] = $obj;
}
return static::$parsedAgents[ $userAgent ];
}
/**