JBrowser
Browser class, provides capability information about the current web client.
Browser identification is performed by examining the HTTP_USER_AGENT environment variable provided by the web server.
This class has many influences from the lib/Browser.php code in version 3 of Horde.
Located in /joomla/environment/browser.php (line 36)
JObject (Subpackage Base) JBrowser (Subpackage Environment)
HTTP_ACCEPT string
Full user agent string.
Browser name.
'html' => true,
'hdml' => false,
'wml' => false,
'images' => true,
'iframes' => false,
'frames' => true,
'tables' => true,
'java' => true,
'javascript' => true,
'dom' => false,
'utf' => false,
'rte' => false,
'homepage' => false,
'accesskey' => false,
'optgroup' => false,
'xmlhttpreq' => false,
'cite' => false,
) (line 154)
Features.
List of viewable image MIME subtypes.
This list of viewable images works for IE and Netscape/Mozilla.
Lower-case user agent string.
Major version number.
Minor version number.
Is this a mobile browser?
Platform the browser is running on.
'avoid_popup_windows' => false,
'break_disposition_header' => false,
'break_disposition_filename' => false,
'broken_multipart_form' => false,
'cache_same_url' => false,
'cache_ssl_downloads' => false,
'double_linebreak_textarea' => false,
'empty_file_input_value' => false,
'must_cache_forms' => false,
'no_filename_spaces' => false,
'no_hidden_overflow_tables' => false,
'ow_gui_1.3' => false,
'png_transparency' => false,
'scrollbar_in_way' => false,
'scroll_tds' => false,
'windowed_controls' => false,
) (line 179)
Quirks
/* The most common ones. */
'Googlebot',
'msnbot',
'Slurp',
'Yahoo',
/* The rest alphabetically. */
'Arachnoidea',
'ArchitextSpider',
'Ask Jeeves',
'B-l-i-t-z-Bot',
'Baiduspider',
'BecomeBot',
'cfetch',
'ConveraCrawler',
'ExtractorPro',
'FAST-WebCrawler',
'FDSE robot',
'fido',
'geckobot',
'Gigabot',
'Girafabot',
'grub-client',
'Gulliver',
'HTTrack',
'ia_archiver',
'InfoSeek',
'kinjabot',
'KIT-Fireball',
'larbin',
'LEIA',
'lmspider',
'Lycos_Spider',
'Mediapartners-Google',
'MuscatFerret',
'NaverBot',
'OmniExplorer_Bot',
'polybot',
'Pompos',
'Scooter',
'Teoma',
'TheSuBot',
'TurnitinBot',
'Ultraseek',
'ViolaBot',
'webbandit',
'www.almaden.ibm.com/cs/crawler',
'ZyBorg',
) (line 92)
Known robots.
Create a browser instance (Constructor).
- string $userAgent: The browser string to parse.
- string $accept: The HTTP_ACCEPT settings to use.
- JObject::__construct()
- Class constructor, overridden in descendant classes.
Retrieve the current browser capability.
- string $feature: The capability to retrieve.
Returns the server protocol in use on the current server.
Returns a reference to the global Browser object, only creating it if it doesn't already exist.
This method must be invoked as:
$browser = &JBrowser::getInstance([$userAgent[, $accept]]);
- string $userAgent: The browser string to parse.
- string $accept: The HTTP_ACCEPT settings to use.
Retrieve unique behavior for the current browser.
- string $quirk: The behavior to retrieve.
Check the current browser capabilities.
- string $feature: The capability to check.
Check unique behavior for the current browser.
- string $quirk: The behavior to check.
Determine if the given browser is the same as the current.
- string $browser: The browser to check.
Determine if we are using a secure (SSL) connection.
Determines if a browser can display a given MIME type.
- string $mimetype: The MIME type to check.
Parses the user agent string and inititializes the object with all the known features and quirks for the given browser.
- string $userAgent: The browser string to parse.
- string $accept: The HTTP_ACCEPT settings to use.
Sets the current browser.
- string $browser: The browser to set as current.
Set capabilities for the current browser.
- string $feature: The capability to set.
- string $value: Special capability parameter.
Set unique behavior for the current browser.
- string $quirk: The behavior to set.
- string $value: Special behavior parameter.
Match the platform of the browser.
This is a pretty simplistic implementation, but it's intended to let us tell what line breaks to send, so it's good enough for its purpose.
Inherited Methods
Inherited From JObject
JObject::JObject()
JObject::__construct()
JObject::get()
JObject::getPublicProperties()
JObject::set()
JObject::toString()
Documentation generated on Mon, 05 Mar 2007 20:53:26 +0000 by phpDocumentor 1.3.1