API17:JApplication
From Joomla! Documentation
(Difference between revisions)
(Layout updates) |
m (→User contributed notes: bad link repair) |
||
| (One intermediate revision by one user not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| + | =={{JVer|11.1}} JApplication== | ||
| + | ===Description=== | ||
| + | {{Description:JApplication}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[Description:JApplication|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JApplication|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
| + | !Visibility | ||
!Method name | !Method name | ||
!Description | !Description | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::__construct/11.1|__construct]] | |[[JApplication::__construct/11.1|__construct]] | ||
|Class constructor. | |Class constructor. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::__toString/11.1|__toString]] | |[[JApplication::__toString/11.1|__toString]] | ||
|Returns the response. | |Returns the response. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::checkSession/11.1|checkSession]] | |[[JApplication::checkSession/11.1|checkSession]] | ||
|Checks the user session. | |Checks the user session. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::close/11.1|close]] | |[[JApplication::close/11.1|close]] | ||
|Exit the application. | |Exit the application. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::dispatch/11.1|dispatch]] | |[[JApplication::dispatch/11.1|dispatch]] | ||
|Dispatch the applicaiton. | |Dispatch the applicaiton. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::enqueueMessage/11.1|enqueueMessage]] | |[[JApplication::enqueueMessage/11.1|enqueueMessage]] | ||
|Enqueue a system message. | |Enqueue a system message. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getCfg/11.1|getCfg]] | |[[JApplication::getCfg/11.1|getCfg]] | ||
| | | | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getClientId/11.1|getClientId]] | |[[JApplication::getClientId/11.1|getClientId]] | ||
|Gets the client id of the current running application. | |Gets the client id of the current running application. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getMenu/11.1|getMenu]] | |[[JApplication::getMenu/11.1|getMenu]] | ||
|Returns the application object. | |Returns the application object. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getMessageQueue/11.1|getMessageQueue]] | |[[JApplication::getMessageQueue/11.1|getMessageQueue]] | ||
|Get the system message queue. | |Get the system message queue. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getName/11.1|getName]] | |[[JApplication::getName/11.1|getName]] | ||
|Method to get the application name. | |Method to get the application name. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getPathway/11.1|getPathway]] | |[[JApplication::getPathway/11.1|getPathway]] | ||
|Returns the application object. | |Returns the application object. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getTemplate/11.1|getTemplate]] | |[[JApplication::getTemplate/11.1|getTemplate]] | ||
|Gets the name of the current template. | |Gets the name of the current template. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getUserState/11.1|getUserState]] | |[[JApplication::getUserState/11.1|getUserState]] | ||
|Gets a user state. | |Gets a user state. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getUserStateFromRequest/11.1|getUserStateFromRequest]] | |[[JApplication::getUserStateFromRequest/11.1|getUserStateFromRequest]] | ||
|Gets the value of a user state variable. | |Gets the value of a user state variable. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::initialise/11.1|initialise]] | |[[JApplication::initialise/11.1|initialise]] | ||
|Initialise the application. | |Initialise the application. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::isAdmin/11.1|isAdmin]] | |[[JApplication::isAdmin/11.1|isAdmin]] | ||
|Is admin interface? | |Is admin interface? | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::isSite/11.1|isSite]] | |[[JApplication::isSite/11.1|isSite]] | ||
|Is site interface? | |Is site interface? | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::login/11.1|login]] | |[[JApplication::login/11.1|login]] | ||
|Login authentication function. | |Login authentication function. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::logout/11.1|logout]] | |[[JApplication::logout/11.1|logout]] | ||
|Logout authentication function. | |Logout authentication function. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::redirect/11.1|redirect]] | |[[JApplication::redirect/11.1|redirect]] | ||
|Redirect to another URL. | |Redirect to another URL. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::render/11.1|render]] | |[[JApplication::render/11.1|render]] | ||
|Render the application. | |Render the application. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::route/11.1|route]] | |[[JApplication::route/11.1|route]] | ||
|Route the application. | |Route the application. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::setUserState/11.1|setUserState]] | |[[JApplication::setUserState/11.1|setUserState]] | ||
|Sets the value of a user state variable. | |Sets the value of a user state variable. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::triggerEvent/11.1|triggerEvent]] | |[[JApplication::triggerEvent/11.1|triggerEvent]] | ||
|Calls all handlers associated with an event group. | |Calls all handlers associated with an event group. | ||
|- | |- | ||
| + | |public static | ||
|[[JApplication::getHash/11.1|getHash]] | |[[JApplication::getHash/11.1|getHash]] | ||
|Provides a secure hash based on a seed. | |Provides a secure hash based on a seed. | ||
|- | |- | ||
| + | |public static | ||
|[[JApplication::getInstance/11.1|getInstance]] | |[[JApplication::getInstance/11.1|getInstance]] | ||
|Returns the global object, only creating it if it doesn't already exist. | |Returns the global object, only creating it if it doesn't already exist. | ||
|- | |- | ||
| + | |public static | ||
|[[JApplication::getRouter/11.1|getRouter]] | |[[JApplication::getRouter/11.1|getRouter]] | ||
|Returns the application object. | |Returns the application object. | ||
|- | |- | ||
| + | |public static | ||
|[[JApplication::isWinOS/11.1|isWinOS]] | |[[JApplication::isWinOS/11.1|isWinOS]] | ||
|Method to determine if the host OS is Windows. | |Method to determine if the host OS is Windows. | ||
|- | |- | ||
| + | |public static | ||
|[[JApplication::registerEvent/11.1|registerEvent]] | |[[JApplication::registerEvent/11.1|registerEvent]] | ||
|Registers a handler to a particular event group. | |Registers a handler to a particular event group. | ||
|- | |- | ||
| + | |public static | ||
|[[JApplication::stringURLSafe/11.1|stringURLSafe]] | |[[JApplication::stringURLSafe/11.1|stringURLSafe]] | ||
|This method transliterates a string into an URL safe string or returns a URL safe UTF-8 string based on the global configuration. | |This method transliterates a string into an URL safe string or returns a URL safe UTF-8 string based on the global configuration. | ||
|- | |- | ||
| + | |protected | ||
|[[JApplication::_createConfiguration/11.1|_createConfiguration]] | |[[JApplication::_createConfiguration/11.1|_createConfiguration]] | ||
|Create the configuration registry. | |Create the configuration registry. | ||
|- | |- | ||
| + | |protected | ||
|[[JApplication::_createSession/11.1|_createSession]] | |[[JApplication::_createSession/11.1|_createSession]] | ||
|Create the user session. | |Create the user session. | ||
|- | |- | ||
|} | |} | ||
| + | * '''Defined in''' libraries/joomla/application/application.php | ||
| + | * '''Extends''' [[JObject/11.1|JObject]] | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.application.application' );</source> | <source lang="php">jimport( 'joomla.application.application' );</source> | ||
===See also=== | ===See also=== | ||
| − | * JApplication source code | + | * {{JVer|11.1}} '''JApplication source code''' on [[jplatform:application/application.php|BitBucket]] |
| − | * [[JApplication|Other versions of | + | * {{JVer|11.1}} Subpackage [[Subpackage Application/11.1|Application]] |
| + | * [[JApplication|Other versions of JApplication]] | ||
{{SeeAlso:JApplication}} | {{SeeAlso:JApplication}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JApplication|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JApplication|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | === | + | ===User contributed notes=== |
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
| Line 135: | Line 166: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
| + | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
| − | <noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JApplication]]</noinclude> | + | <noinclude>[[Category:Platform JClasses]][[Category:Platform 11.1]][[Category:JApplication]]</noinclude> |
Revision as of 13:27, 29 August 2012
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.
JApplication
Description
JApplication is the base class for a Joomla Application. It acts as a Factory class for application specific objects and provides many supporting API functions. Derived clases should supply the route(), dispatch() and render() functions. [Edit Descripton]
Methods
| Visibility | Method name | Description |
|---|---|---|
| public | __construct | Class constructor. |
| public | __toString | Returns the response. |
| public | checkSession | Checks the user session. |
| public | close | Exit the application. |
| public | dispatch | Dispatch the applicaiton. |
| public | enqueueMessage | Enqueue a system message. |
| public | getCfg | |
| public | getClientId | Gets the client id of the current running application. |
| public | getMenu | Returns the application object. |
| public | getMessageQueue | Get the system message queue. |
| public | getName | Method to get the application name. |
| public | getPathway | Returns the application object. |
| public | getTemplate | Gets the name of the current template. |
| public | getUserState | Gets a user state. |
| public | getUserStateFromRequest | Gets the value of a user state variable. |
| public | initialise | Initialise the application. |
| public | isAdmin | Is admin interface? |
| public | isSite | Is site interface? |
| public | login | Login authentication function. |
| public | logout | Logout authentication function. |
| public | redirect | Redirect to another URL. |
| public | render | Render the application. |
| public | route | Route the application. |
| public | setUserState | Sets the value of a user state variable. |
| public | triggerEvent | Calls all handlers associated with an event group. |
| public static | getHash | Provides a secure hash based on a seed. |
| public static | getInstance | Returns the global object, only creating it if it doesn't already exist. |
| public static | getRouter | Returns the application object. |
| public static | isWinOS | Method to determine if the host OS is Windows. |
| public static | registerEvent | Registers a handler to a particular event group. |
| public static | stringURLSafe | This method transliterates a string into an URL safe string or returns a URL safe UTF-8 string based on the global configuration. |
| protected | _createConfiguration | Create the configuration registry. |
| protected | _createSession | Create the user session. |
- Defined in libraries/joomla/application/application.php
- Extends JObject
Importing
jimport( 'joomla.application.application' );
See also
-
JApplication source code on BitBucket
-
Subpackage Application
- Other versions of JApplication
See Also
-
JApplication on api.joomla.org
-
JApplication source code on JoomlaCode
-
Subpackage Application
- Other versions of JApplication
User contributed notes
<CodeExamplesForm />
