API17:JBrowser
From Joomla! Documentation
(Difference between revisions)
(Layout updates) |
(Updated to r1448:247ba8d88526) |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| + | =={{JVer|11.1}} JBrowser== | ||
| + | ===Description=== | ||
| + | {{Description:JBrowser}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[Description:JBrowser|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JBrowser|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
| + | !Visibility | ||
!Method name | !Method name | ||
!Description | !Description | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::__construct/11.1|__construct]] | |[[JBrowser::__construct/11.1|__construct]] | ||
|Create a browser instance (constructor). | |Create a browser instance (constructor). | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::getAgentString/11.1|getAgentString]] | |[[JBrowser::getAgentString/11.1|getAgentString]] | ||
|Return the full browser agent string. | |Return the full browser agent string. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::getBrowser/11.1|getBrowser]] | |[[JBrowser::getBrowser/11.1|getBrowser]] | ||
|Retrieve the current browser. | |Retrieve the current browser. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::getFeature/11.1|getFeature]] | |[[JBrowser::getFeature/11.1|getFeature]] | ||
|Retrieve the current browser capability. | |Retrieve the current browser capability. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::getHTTPProtocol/11.1|getHTTPProtocol]] | |[[JBrowser::getHTTPProtocol/11.1|getHTTPProtocol]] | ||
|Returns the server protocol in use on the current server. | |Returns the server protocol in use on the current server. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::getMajor/11.1|getMajor]] | |[[JBrowser::getMajor/11.1|getMajor]] | ||
|Retrieve the current browser's major version. | |Retrieve the current browser's major version. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::getMinor/11.1|getMinor]] | |[[JBrowser::getMinor/11.1|getMinor]] | ||
|Retrieve the current browser's minor version. | |Retrieve the current browser's minor version. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::getPlatform/11.1|getPlatform]] | |[[JBrowser::getPlatform/11.1|getPlatform]] | ||
|Return the currently matched platform. | |Return the currently matched platform. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::getQuirk/11.1|getQuirk]] | |[[JBrowser::getQuirk/11.1|getQuirk]] | ||
|Retrieve unique behavior for the current browser. | |Retrieve unique behavior for the current browser. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::getVersion/11.1|getVersion]] | |[[JBrowser::getVersion/11.1|getVersion]] | ||
|Retrieve the current browser's version. | |Retrieve the current browser's version. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::hasFeature/11.1|hasFeature]] | |[[JBrowser::hasFeature/11.1|hasFeature]] | ||
|Check the current browser capabilities. | |Check the current browser capabilities. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::hasQuirk/11.1|hasQuirk]] | |[[JBrowser::hasQuirk/11.1|hasQuirk]] | ||
|Check unique behavior for the current browser. | |Check unique behavior for the current browser. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::isBrowser/11.1|isBrowser]] | |[[JBrowser::isBrowser/11.1|isBrowser]] | ||
|Determine if the given browser is the same as the current. | |Determine if the given browser is the same as the current. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::isMobile/11.1|isMobile]] | |[[JBrowser::isMobile/11.1|isMobile]] | ||
|Determines if the browser is mobile version or not. | |Determines if the browser is mobile version or not. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::isRobot/11.1|isRobot]] | |[[JBrowser::isRobot/11.1|isRobot]] | ||
|Determines if the browser is a robot or not. | |Determines if the browser is a robot or not. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::isSSLConnection/11.1|isSSLConnection]] | |[[JBrowser::isSSLConnection/11.1|isSSLConnection]] | ||
|Determine if we are using a secure (SSL) connection. | |Determine if we are using a secure (SSL) connection. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::isViewable/11.1|isViewable]] | |[[JBrowser::isViewable/11.1|isViewable]] | ||
|Determines if a browser can display a given MIME type. | |Determines if a browser can display a given MIME type. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::match/11.1|match]] | |[[JBrowser::match/11.1|match]] | ||
|Parses the user agent string and inititializes the object with all the known features and quirks for the given browser. | |Parses the user agent string and inititializes the object with all the known features and quirks for the given browser. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::setBrowser/11.1|setBrowser]] | |[[JBrowser::setBrowser/11.1|setBrowser]] | ||
|Sets the current browser. | |Sets the current browser. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::setFeature/11.1|setFeature]] | |[[JBrowser::setFeature/11.1|setFeature]] | ||
|Set capabilities for the current browser. | |Set capabilities for the current browser. | ||
|- | |- | ||
| + | |public | ||
|[[JBrowser::setQuirk/11.1|setQuirk]] | |[[JBrowser::setQuirk/11.1|setQuirk]] | ||
|Set unique behavior for the current browser. | |Set unique behavior for the current browser. | ||
|- | |- | ||
| + | |public static | ||
|[[JBrowser::_sortMime/11.1|_sortMime]] | |[[JBrowser::_sortMime/11.1|_sortMime]] | ||
| | | | ||
|- | |- | ||
| + | |public static | ||
|[[JBrowser::getInstance/11.1|getInstance]] | |[[JBrowser::getInstance/11.1|getInstance]] | ||
|Returns the global Browser object, only creating it if it doesn't already exist. | |Returns the global Browser object, only creating it if it doesn't already exist. | ||
|- | |- | ||
| + | |protected | ||
|[[JBrowser::_setPlatform/11.1|_setPlatform]] | |[[JBrowser::_setPlatform/11.1|_setPlatform]] | ||
|Match the platform of the browser. | |Match the platform of the browser. | ||
|- | |- | ||
|} | |} | ||
| + | * '''Defined in''' libraries/joomla/environment/browser.php | ||
| + | * '''Extends''' [[JObject/11.1|JObject]] | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.environment.browser' );</source> | <source lang="php">jimport( 'joomla.environment.browser' );</source> | ||
===See also=== | ===See also=== | ||
| − | * JBrowser source code | + | * {{JVer|11.1}} '''JBrowser source code''' on [[jplatform:environment/browser.php|BitBucket]] |
| − | * [[JBrowser|Other versions of | + | * {{JVer|11.1}} Subpackage [[Subpackage Environment/11.1|Environment]] |
| + | * [[JBrowser|Other versions of JBrowser]] | ||
{{SeeAlso:JBrowser}} | {{SeeAlso:JBrowser}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JBrowser|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JBrowser|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | === | + | ===User contributed notes=== |
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
| Line 108: | Line 130: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
| + | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JBrowser]]</noinclude> | <noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JBrowser]]</noinclude> | ||
Revision as of 17:55, 27 April 2011
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
JBrowser
Description
Description:JBrowser [Edit Descripton]
Methods
| Visibility | Method name | Description |
|---|---|---|
| public | __construct | Create a browser instance (constructor). |
| public | getAgentString | Return the full browser agent string. |
| public | getBrowser | Retrieve the current browser. |
| public | getFeature | Retrieve the current browser capability. |
| public | getHTTPProtocol | Returns the server protocol in use on the current server. |
| public | getMajor | Retrieve the current browser's major version. |
| public | getMinor | Retrieve the current browser's minor version. |
| public | getPlatform | Return the currently matched platform. |
| public | getQuirk | Retrieve unique behavior for the current browser. |
| public | getVersion | Retrieve the current browser's version. |
| public | hasFeature | Check the current browser capabilities. |
| public | hasQuirk | Check unique behavior for the current browser. |
| public | isBrowser | Determine if the given browser is the same as the current. |
| public | isMobile | Determines if the browser is mobile version or not. |
| public | isRobot | Determines if the browser is a robot or not. |
| public | isSSLConnection | Determine if we are using a secure (SSL) connection. |
| public | isViewable | Determines if a browser can display a given MIME type. |
| public | match | Parses the user agent string and inititializes the object with all the known features and quirks for the given browser. |
| public | setBrowser | Sets the current browser. |
| public | setFeature | Set capabilities for the current browser. |
| public | setQuirk | Set unique behavior for the current browser. |
| public static | _sortMime | |
| public static | getInstance | Returns the global Browser object, only creating it if it doesn't already exist. |
| protected | _setPlatform | Match the platform of the browser. |
- Defined in libraries/joomla/environment/browser.php
- Extends JObject
Importing
jimport( 'joomla.environment.browser' );
See also
-
JBrowser source code on BitBucket
-
Subpackage Environment
- Other versions of JBrowser
SeeAlso:JBrowser [Edit See Also]
User contributed notes
<CodeExamplesForm />
