JApplication/1.5
From Joomla! Documentation
< JApplication(Difference between revisions)
(Bulk upload by Doxiki2) |
(Layout updates) |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| + | =={{JVer|1.5}} 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/1.5|__construct]] | |[[JApplication::__construct/1.5|__construct]] | ||
|Class constructor. | |Class constructor. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::_createConfiguration/1.5|_createConfiguration]] | |[[JApplication::_createConfiguration/1.5|_createConfiguration]] | ||
|Create the configuration registry. | |Create the configuration registry. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::_createSession/1.5|_createSession]] | |[[JApplication::_createSession/1.5|_createSession]] | ||
|Create the user session. | |Create the user session. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::addCustomHeadTag/1.5|addCustomHeadTag]] | |[[JApplication::addCustomHeadTag/1.5|addCustomHeadTag]] | ||
|Deprecated, use JDocument->addCustomTag instead (only when document type is HTML). | |Deprecated, use JDocument->addCustomTag instead (only when document type is HTML). | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::addMetaTag/1.5|addMetaTag]] | |[[JApplication::addMetaTag/1.5|addMetaTag]] | ||
|Deprecated, use JDocument->setMetaData instead. | |Deprecated, use JDocument->setMetaData instead. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::appendMetaTag/1.5|appendMetaTag]] | |[[JApplication::appendMetaTag/1.5|appendMetaTag]] | ||
|Deprecated, use JDocument->setMetaData instead. | |Deprecated, use JDocument->setMetaData instead. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::appendPathWay/1.5|appendPathWay]] | |[[JApplication::appendPathWay/1.5|appendPathWay]] | ||
|Deprecated functions. | |Deprecated functions. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::close/1.5|close]] | |[[JApplication::close/1.5|close]] | ||
|Exit the application. | |Exit the application. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::dispatch/1.5|dispatch]] | |[[JApplication::dispatch/1.5|dispatch]] | ||
|Dispatch the applicaiton. | |Dispatch the applicaiton. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::enqueueMessage/1.5|enqueueMessage]] | |[[JApplication::enqueueMessage/1.5|enqueueMessage]] | ||
|Enqueue a system message. | |Enqueue a system message. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getBasePath/1.5|getBasePath]] | |[[JApplication::getBasePath/1.5|getBasePath]] | ||
|Deprecated, use instead. | |Deprecated, use instead. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getBlogCategoryCount/1.5|getBlogCategoryCount]] | |[[JApplication::getBlogCategoryCount/1.5|getBlogCategoryCount]] | ||
|Deprecated. | |Deprecated. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getBlogSectionCount/1.5|getBlogSectionCount]] | |[[JApplication::getBlogSectionCount/1.5|getBlogSectionCount]] | ||
|Deprecated. | |Deprecated. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getCfg/1.5|getCfg]] | |[[JApplication::getCfg/1.5|getCfg]] | ||
| | | | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getClientId/1.5|getClientId]] | |[[JApplication::getClientId/1.5|getClientId]] | ||
|Gets the client id of the current running application. | |Gets the client id of the current running application. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getContentItemLinkCount/1.5|getContentItemLinkCount]] | |[[JApplication::getContentItemLinkCount/1.5|getContentItemLinkCount]] | ||
|Deprecated. | |Deprecated. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getCustomPathWay/1.5|getCustomPathWay]] | |[[JApplication::getCustomPathWay/1.5|getCustomPathWay]] | ||
|Deprecated, use JPathway->getPathWayNames() method instead. | |Deprecated, use JPathway->getPathWayNames() method instead. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getGlobalBlogSectionCount/1.5|getGlobalBlogSectionCount]] | |[[JApplication::getGlobalBlogSectionCount/1.5|getGlobalBlogSectionCount]] | ||
|Deprecated. | |Deprecated. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getHead/1.5|getHead]] | |[[JApplication::getHead/1.5|getHead]] | ||
|Deprecated, use JDocument->get( 'head' ) instead. | |Deprecated, use JDocument->get( 'head' ) instead. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getInstance/1.5|getInstance]] | |[[JApplication::getInstance/1.5|getInstance]] | ||
|Returns a reference to the global object, only creating it if it doesn't already exist. | |Returns a reference to the global object, only creating it if it doesn't already exist. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getItemid/1.5|getItemid]] | |[[JApplication::getItemid/1.5|getItemid]] | ||
|Deprecated, use ContentHelper::getItemid instead. | |Deprecated, use ContentHelper::getItemid instead. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getMenu/1.5|getMenu]] | |[[JApplication::getMenu/1.5|getMenu]] | ||
|Return a reference to the application object. | |Return a reference to the application object. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getMessageQueue/1.5|getMessageQueue]] | |[[JApplication::getMessageQueue/1.5|getMessageQueue]] | ||
|Get the system message queue. | |Get the system message queue. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getName/1.5|getName]] | |[[JApplication::getName/1.5|getName]] | ||
|Method to get the application name. | |Method to get the application name. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getPageTitle/1.5|getPageTitle]] | |[[JApplication::getPageTitle/1.5|getPageTitle]] | ||
|Deprecated, use instead. | |Deprecated, use instead. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getPath/1.5|getPath]] | |[[JApplication::getPath/1.5|getPath]] | ||
|Deprecated, use instead. | |Deprecated, use instead. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getPathway/1.5|getPathway]] | |[[JApplication::getPathway/1.5|getPathway]] | ||
|Return a reference to the application object. | |Return a reference to the application object. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getRouter/1.5|getRouter]] | |[[JApplication::getRouter/1.5|getRouter]] | ||
|Return a reference to the application object. | |Return a reference to the application object. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getStaticContentCount/1.5|getStaticContentCount]] | |[[JApplication::getStaticContentCount/1.5|getStaticContentCount]] | ||
|Deprecated. | |Deprecated. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getTemplate/1.5|getTemplate]] | |[[JApplication::getTemplate/1.5|getTemplate]] | ||
|Gets the name of the current template. | |Gets the name of the current template. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getUser/1.5|getUser]] | |[[JApplication::getUser/1.5|getUser]] | ||
|Deprecated, use instead. | |Deprecated, use instead. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getUserState/1.5|getUserState]] | |[[JApplication::getUserState/1.5|getUserState]] | ||
|Gets a user state. | |Gets a user state. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::getUserStateFromRequest/1.5|getUserStateFromRequest]] | |[[JApplication::getUserStateFromRequest/1.5|getUserStateFromRequest]] | ||
|Gets the value of a user state variable. | |Gets the value of a user state variable. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::initialise/1.5|initialise]] | |[[JApplication::initialise/1.5|initialise]] | ||
|Initialise the application. | |Initialise the application. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::isAdmin/1.5|isAdmin]] | |[[JApplication::isAdmin/1.5|isAdmin]] | ||
|Is admin interface? | |Is admin interface? | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::isSite/1.5|isSite]] | |[[JApplication::isSite/1.5|isSite]] | ||
|Is site interface? | |Is site interface? | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::login/1.5|login]] | |[[JApplication::login/1.5|login]] | ||
|Login authentication function. | |Login authentication function. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::logout/1.5|logout]] | |[[JApplication::logout/1.5|logout]] | ||
|Logout authentication function. | |Logout authentication function. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::prependMetaTag/1.5|prependMetaTag]] | |[[JApplication::prependMetaTag/1.5|prependMetaTag]] | ||
|Deprecated, use JDocument->setMetaData instead. | |Deprecated, use JDocument->setMetaData instead. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::redirect/1.5|redirect]] | |[[JApplication::redirect/1.5|redirect]] | ||
|Redirect to another URL. | |Redirect to another URL. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::render/1.5|render]] | |[[JApplication::render/1.5|render]] | ||
|Render the application. | |Render the application. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::route/1.5|route]] | |[[JApplication::route/1.5|route]] | ||
|Route the application. | |Route the application. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::setPageTitle/1.5|setPageTitle]] | |[[JApplication::setPageTitle/1.5|setPageTitle]] | ||
|Deprecated, use instead. | |Deprecated, use instead. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::setUserState/1.5|setUserState]] | |[[JApplication::setUserState/1.5|setUserState]] | ||
|Sets the value of a user state variable. | |Sets the value of a user state variable. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::registerEvent/1.5|registerEvent]] | |[[JApplication::registerEvent/1.5|registerEvent]] | ||
|Registers a handler to a particular event group. | |Registers a handler to a particular event group. | ||
|- | |- | ||
| + | |public | ||
|[[JApplication::triggerEvent/1.5|triggerEvent]] | |[[JApplication::triggerEvent/1.5|triggerEvent]] | ||
|Calls all handlers associated with an event group. | |Calls all handlers associated with an event group. | ||
|- | |- | ||
|} | |} | ||
| + | * '''Defined in''' libraries/joomla/application/application.php | ||
| + | * '''Extends''' [[JObject/1.5|JObject]] | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.application.application' );</source> | <source lang="php">jimport( 'joomla.application.application' );</source> | ||
===See also=== | ===See also=== | ||
| + | * {{JVer|1.5}} '''JApplication''' on [http://api.joomla.org/Joomla-Framework/Application/JApplication.html api.joomla.org] | ||
| + | * {{JVer|1.5}} '''JApplication source code''' on [[jframework15:application/application.php|JoomlaCode]] | ||
| + | * {{JVer|1.5}} Subpackage [[Subpackage Application/1.5|Application]] | ||
| + | * [[JApplication|Other versions of 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 173: | Line 219: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
| + | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category:Framework]][[Category:Framework 1.5]][[Category:JApplication]]</noinclude> | <noinclude>[[Category:Framework]][[Category:Framework 1.5]][[Category:JApplication]]</noinclude> | ||
Revision as of 18:04, 25 April 2011
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 | _createConfiguration | Create the configuration registry. |
| public | _createSession | Create the user session. |
| public | addCustomHeadTag | Deprecated, use JDocument->addCustomTag instead (only when document type is HTML). |
| public | addMetaTag | Deprecated, use JDocument->setMetaData instead. |
| public | appendMetaTag | Deprecated, use JDocument->setMetaData instead. |
| public | appendPathWay | Deprecated functions. |
| public | close | Exit the application. |
| public | dispatch | Dispatch the applicaiton. |
| public | enqueueMessage | Enqueue a system message. |
| public | getBasePath | Deprecated, use instead. |
| public | getBlogCategoryCount | Deprecated. |
| public | getBlogSectionCount | Deprecated. |
| public | getCfg | |
| public | getClientId | Gets the client id of the current running application. |
| public | getContentItemLinkCount | Deprecated. |
| public | getCustomPathWay | Deprecated, use JPathway->getPathWayNames() method instead. |
| public | getGlobalBlogSectionCount | Deprecated. |
| public | getHead | Deprecated, use JDocument->get( 'head' ) instead. |
| public | getInstance | Returns a reference to the global object, only creating it if it doesn't already exist. |
| public | getItemid | Deprecated, use ContentHelper::getItemid instead. |
| public | getMenu | Return a reference to the application object. |
| public | getMessageQueue | Get the system message queue. |
| public | getName | Method to get the application name. |
| public | getPageTitle | Deprecated, use instead. |
| public | getPath | Deprecated, use instead. |
| public | getPathway | Return a reference to the application object. |
| public | getRouter | Return a reference to the application object. |
| public | getStaticContentCount | Deprecated. |
| public | getTemplate | Gets the name of the current template. |
| public | getUser | Deprecated, use instead. |
| 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 | prependMetaTag | Deprecated, use JDocument->setMetaData instead. |
| public | redirect | Redirect to another URL. |
| public | render | Render the application. |
| public | route | Route the application. |
| public | setPageTitle | Deprecated, use instead. |
| public | setUserState | Sets the value of a user state variable. |
| public | registerEvent | Registers a handler to a particular event group. |
| public | triggerEvent | Calls all handlers associated with an event group. |
- Defined in libraries/joomla/application/application.php
- Extends JObject
Importing
jimport( 'joomla.application.application' );
See also
-
JApplication on api.joomla.org
-
JApplication source code on JoomlaCode
-
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 />