JApplication

From Joomla! Documentation
(Difference between revisions)
Jump to: navigation, search
m (Defined in)
(Bulk upload by Doxiki2)
Line 1: Line 1:
'''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.
+
This class is available in the following Joomla versions:-
 
+
<splist showpath=notparent />
===Availability===
+
<noinclude>[[Category:Framework]][[Category:JApplication]]</noinclude>
{{JVer|1.5}} {{JVer|1.6}}
+
 
+
===Defined in===
+
/libraries/joomla/application/application.php
+
 
+
===Methods===
+
{| class="wikitable"
+
|-
+
!Method name
+
!Description
+
|-
+
|[[JApplication/__construct|__construct]]
+
|Class constructor.
+
|-
+
|[[JApplication/__toString|__toString]]
+
|Returns the response. {{JVer|1.6}}
+
|-
+
|[[JApplication/addCustomHeadTag|addCustomHeadTag]]
+
|Deprecated, use [[JDocument/addCustomTag|JDocument->addCustomTag]] instead (only when document type is HTML).
+
|-
+
|[[JApplication/addMetaTag|addMetaTag]]
+
|Deprecated, use [[JDocument/setMetaData|JDocument->setMetaData]] instead.
+
|-
+
|[[JApplication/appendMetaTag|appendMetaTag]]
+
|Deprecated, use [[JDocument/setMetaData|JDocument->setMetaData]] instead.
+
|-
+
|[[JApplication/appendPathWay|appendPathWay]]
+
|Deprecated, use [[JPathWay/addItem|JPathWay->addItem()]] method instead.
+
|-
+
|[[JApplication/close|close]]
+
|Exit the application.
+
|-
+
|[[JApplication/dispatch|dispatch]]
+
|Dispatch the applicaiton.
+
|-
+
|[[JApplication/enqueueMessage|enqueueMessage]]
+
|Enqueue a system message.
+
|-
+
|[[JApplication/getBasePath|getBasePath]]
+
|Deprecated, use [[JURI/base|JURI::base()]] instead.
+
|-
+
|[[JApplication/getBlogCategoryCount|getBlogCategoryCount]]
+
|Deprecated.
+
|-
+
|[[JApplication/getBlogSectionCount|getBlogSectionCount]]
+
|Deprecated.
+
|-
+
|[[JApplication/getCfg|getCfg]]
+
|Gets a configuration value.
+
|-
+
|[[JApplication/getClientId|getClientId]]
+
|Gets the client id of the current running application.
+
|-
+
|[[JApplication/getContentItemLinkCount|getContentItemLinkCount]]
+
|Deprecated.
+
|-
+
|[[JApplication/getCustomPathWay|getCustomPathWay]]
+
|Deprecated, use [[JPathway/getPathWayNames|JPathway->getPathWayNames()]] method instead.
+
|-
+
|[[JApplication/getGlobalBlogSectionCount|getGlobalBlogSectionCount]]
+
|Deprecated.
+
|-
+
|[[JApplication/getHead|getHead]]
+
|Deprecated, use [[JDocument/get|JDocument->get( 'head' )]] instead.
+
|-
+
|[[JApplication/getInstance|getInstance]]
+
|Returns a reference to the global JApplication object, only creating it if it doesn't already exist.
+
|-
+
|[[JApplication/getItemid|getItemid]]
+
|Deprecated, use [[ContentHelper/getItemid|ContentHelper::getItemid]] instead.
+
|-
+
|[[JApplication/getMenu|getMenu]]
+
|Return a reference to the application JPathway object.
+
|-
+
|[[JApplication/getMessageQueue|getMessageQueue]]
+
|Get the system message queue.
+
|-
+
|[[JApplication/getName|getName]]
+
|Method to get the application name
+
|-
+
|[[JApplication/getPageTitle|getPageTitle]]
+
|Deprecated, use [[JDocument/getTitle|JDocument::getTitle]] instead.
+
|-
+
|[[JApplication/getPath|getPath]]
+
|Deprecated, use [[JApplicationHelper/getPath|JApplicationHelper::getPath]] instead.
+
|-
+
|[[JApplication/getPathway|getPathway]]
+
|Return a reference to the application JPathway object.
+
|-
+
|[[JApplication/getRouter|getRouter]]
+
|Return a reference to the application JRouter object.
+
|-
+
|[[JApplication/getStaticContentCount|getStaticContentCount]]
+
|Deprecated.
+
|-
+
|[[JApplication/getTemplate|getTemplate]]
+
|Gets the name of the current template.
+
|-
+
|[[JApplication/getUser|getUser]]
+
|Deprecated, use [[JFactory/getUser|JFactory::getUser]] instead.
+
|-
+
|[[JApplication/getUserState|getUserState]]
+
|Gets a user state.
+
|-
+
|[[JApplication/getUserStateFromRequest|getUserStateFromRequest]]
+
|Gets the value of a user state variable.
+
|-
+
|[[JApplication/initialise|initialise]]
+
|Initialise the application.
+
|-
+
|[[JApplication/isAdmin|isAdmin]]
+
|Is admin interface?
+
|-
+
|[[JApplication/isSite|isSite]]
+
|Is site interface?
+
|-
+
|[[JApplication/login|login]]
+
|Login authentication function.
+
|-
+
|[[JApplication/logout|logout]]
+
|Logout authentication function.
+
|-
+
|[[JApplication/prependMetaTag|prependMetaTag]]
+
|Deprecated, use [[JDocument/setMetaData|JDocument->setMetaData]] instead
+
|-
+
|[[JApplication/redirect|redirect]]
+
|Redirect to another URL.
+
|-
+
|[[JApplication/registerEvent|registerEvent]]
+
|Registers a handler to a particular event group.
+
|-
+
|[[JApplication/render|render]]
+
|Render the application. Rendering is the process of pushing the document buffers into the template placeholders, retrieving data from the document and pushing it into the JResponse buffer.
+
|-
+
|[[JApplication/route|route]]
+
|Route the application. Routing is the process of examining the request environment to determine which component should receive the request. The component optional parameters are then set in the request object to be processed when the application is being dispatched.
+
|-
+
|[[JApplication/setPageTitle|setPageTitle]]
+
|Deprecated, use [[JDocument/setTitle|JDocument::setTitle]] instead.
+
|-
+
|[[JApplication/setUserState|setUserState]]
+
|Sets the value of a user state variable.
+
|-
+
|[[JApplication/triggerEvent|triggerEvent]]
+
|Calls all handlers associated with an event group.
+
|}
+
 
+
===Importing===
+
<source lang="php">jimport( 'joomla.application.application' );</source>
+
 
+
===See also===
+
* [http://api.joomla.org/Joomla-Framework/Application/JApplication.html JApplication on api.joomla.org]
+
<noinclude>[[Category:Development]][[Category:Framework]][[Category:JApplication]]</noinclude>
+

Revision as of 16:23, 17 April 2011

This class is available in the following Joomla versions:-

Personal tools
Namespaces

Variants
Actions
Navigation
Joomla! Sites
Toolbox