class CBrowser extends JBrowser


Located at : UKNOWVA_ROOT/components/com_community/libraries/browser.php

Methods

__construct(string $userAgent = null, string $accept = null)

Create a browser instance (constructor).

from JBrowser
string
__toString()

Magic method to convert the object to a string gracefully.

from JObject
mixed
def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

from JObject
mixed
get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

from JObject
array
getProperties(boolean $public = true)

Returns an associative array of object properties.

from JObject
string
getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

from JObject
array
getErrors()

Return all errors, if any.

from JObject
mixed
set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

from JObject
boolean
setProperties(mixed $properties)

Set the object properties based on a named array/hash.

from JObject
void
setError(string $error)

Add an error message.

from JObject
string
toString() deprecated

No description

from JObject
static JBrowser
getInstance(string $userAgent = null, string $accept = null)

Returns the global Browser object, only creating it if it doesn't already exist.

from JBrowser
static 
_sortMime($a, $b)

No description

from JBrowser
match(string $userAgent = null, string $accept = null)

Parses the user agent string and inititializes the object with all the known features and quirks for the given browser.

string
getPlatform()

Return the currently matched platform.

from JBrowser
setBrowser(string $browser)

Sets the current browser.

from JBrowser
string
getBrowser()

Retrieve the current browser.

from JBrowser
integer
getMajor()

Retrieve the current browser's major version.

from JBrowser
integer
getMinor()

Retrieve the current browser's minor version.

from JBrowser
string
getVersion()

Retrieve the current browser's version.

from JBrowser
string
getAgentString()

Return the full browser agent string.

from JBrowser
string
getHTTPProtocol()

Returns the server protocol in use on the current server.

from JBrowser
setQuirk(string $quirk, string $value = true)

Set unique behavior for the current browser.

from JBrowser
boolean
hasQuirk(string $quirk)

Check unique behavior for the current browser.

from JBrowser
string
getQuirk(string $quirk)

Retrieve unique behavior for the current browser.

from JBrowser
setFeature(string $feature, string $value = true)

Set capabilities for the current browser.

from JBrowser
boolean
hasFeature(string $feature)

Check the current browser capabilities.

from JBrowser
string
getFeature(string $feature)

Retrieve the current browser capability.

from JBrowser
boolean
isViewable(string $mimetype)

Determines if a browser can display a given MIME type.

from JBrowser
boolean
isBrowser(string $browser)

Determine if the given browser is the same as the current.

from JBrowser
boolean
isRobot()

Determines if the browser is a robot or not.

from JBrowser
boolean
isMobile()

Determines if the browser is mobile version or not.

isTablet()

No description

from JBrowser
boolean
isMobileApp()

Detects if the system is being accessed through the uKnowva mobile app

from JBrowser
boolean
isSSLConnection()

Determine if we are using a secure (SSL) connection.

from JBrowser
static 
getInstanceStatic($userAgent = null, $accept = null)

No description

Details

in JBrowser at line 199
JObject __construct(string $userAgent = null, string $accept = null)

Create a browser instance (constructor).

Parameters

string $userAgent The browser string to parse.
string $accept The HTTP_ACCEPT settings to use.

Return Value

JObject

in JObject at line 56
string __toString()

Magic method to convert the object to a string gracefully.

Return Value

string The classname.

in JObject at line 70
mixed def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed

in JObject at line 88
mixed get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed The value of the property.

See also

getProperties()

in JObject at line 107
array getProperties(boolean $public = true)

Returns an associative array of object properties.

Parameters

boolean $public If true, returns only the public properties.

Return Value

array

See also

get()

in JObject at line 133
string getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

Parameters

integer $i Option error index.
boolean $toString Indicates if JError objects should return their error message.

Return Value

string Error message

in JObject at line 165
array getErrors()

Return all errors, if any.

Return Value

array Array of error messages or JErrors.

in JObject at line 180
mixed set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

Parameters

string $property The name of the property.
mixed $value The value of the property to set.

Return Value

mixed Previous value of the property.

in JObject at line 198
boolean setProperties(mixed $properties)

Set the object properties based on a named array/hash.

Parameters

mixed $properties Either an associative array or another object.

Return Value

boolean

See also

set()

in JObject at line 222
void setError(string $error)

Add an error message.

Parameters

string $error Error message.

Return Value

void

in JObject at line 235
string toString() deprecated

deprecated 12.1 Use magic method __toString()

Return Value

string

See also

__toString()

in JBrowser at line 214
static JBrowser getInstance(string $userAgent = null, string $accept = null)

Returns the global Browser object, only creating it if it doesn't already exist.

Parameters

string $userAgent The browser string to parse.
string $accept The HTTP_ACCEPT settings to use.

Return Value

JBrowser The Browser object.

in JBrowser at line 231
static _sortMime($a, $b)

Parameters

$a
$b

at line 32
match(string $userAgent = null, string $accept = null)

Parses the user agent string and inititializes the object with all the known features and quirks for the given browser.

Parameters

string $userAgent The browser string to parse.
string $accept The HTTP_ACCEPT settings to use.

in JBrowser at line 657
string getPlatform()

Return the currently matched platform.

Return Value

string The user's platform.

in JBrowser at line 670
setBrowser(string $browser)

Sets the current browser.

Parameters

string $browser The browser to set as current.

in JBrowser at line 681
string getBrowser()

Retrieve the current browser.

Return Value

string The current browser.

in JBrowser at line 692
integer getMajor()

Retrieve the current browser's major version.

Return Value

integer The current browser's major version

in JBrowser at line 703
integer getMinor()

Retrieve the current browser's minor version.

Return Value

integer The current browser's minor version.

in JBrowser at line 714
string getVersion()

Retrieve the current browser's version.

Return Value

string The current browser's version.

in JBrowser at line 725
string getAgentString()

Return the full browser agent string.

Return Value

string The browser agent string

in JBrowser at line 736
string getHTTPProtocol()

Returns the server protocol in use on the current server.

Return Value

string The HTTP server protocol version.

in JBrowser at line 755
setQuirk(string $quirk, string $value = true)

Set unique behavior for the current browser.

Parameters

string $quirk The behavior to set.
string $value Special behavior parameter.

in JBrowser at line 768
boolean hasQuirk(string $quirk)

Check unique behavior for the current browser.

Parameters

string $quirk The behavior to check.

Return Value

boolean Does the browser have the behavior set?

in JBrowser at line 781
string getQuirk(string $quirk)

Retrieve unique behavior for the current browser.

Parameters

string $quirk The behavior to retrieve.

Return Value

string The value for the requested behavior.

in JBrowser at line 797
setFeature(string $feature, string $value = true)

Set capabilities for the current browser.

Parameters

string $feature The capability to set.
string $value Special capability parameter.

in JBrowser at line 811
boolean hasFeature(string $feature)

Check the current browser capabilities.

Parameters

string $feature The capability to check.

Return Value

boolean Does the browser have the capability set?

in JBrowser at line 824
string getFeature(string $feature)

Retrieve the current browser capability.

Parameters

string $feature The capability to retrieve.

Return Value

string The value of the requested capability.

in JBrowser at line 843
boolean isViewable(string $mimetype)

Determines if a browser can display a given MIME type.

Note that image/jpeg and image/pjpeg appear to be the same entity, but Mozilla doesn't seem to want to accept the latter. For our purposes, we will treat them the same.

Parameters

string $mimetype The MIME type to check.

Return Value

boolean True if the browser can display the MIME type.

in JBrowser at line 889
boolean isBrowser(string $browser)

Determine if the given browser is the same as the current.

Parameters

string $browser The browser to check.

Return Value

boolean Is the given browser the same as the current?

in JBrowser at line 900
boolean isRobot()

Determines if the browser is a robot or not.

Return Value

boolean True if browser is a known robot.

at line 43
boolean isMobile()

Determines if the browser is mobile version or not.

Return Value

boolean True if browser is a known mobile version.

in JBrowser at line 928
isTablet()

in JBrowser at line 937
boolean isMobileApp()

Detects if the system is being accessed through the uKnowva mobile app

Return Value

boolean True if browser is the uknowva mobile app.

in JBrowser at line 946
boolean isSSLConnection()

Determine if we are using a secure (SSL) connection.

Return Value

boolean True if using SSL, false if not.

at line 15
static getInstanceStatic($userAgent = null, $accept = null)

Parameters

$userAgent
$accept