API16

JApplication

From Joomla! Documentation

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

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.

Defined in[edit]

libraries/joomla/application/application.php

Methods[edit]

Method name Description
__construct Class constructor.
initialise Initialise the application.
route Route the application.
dispatch Dispatch the applicaiton.
render Render the application.
close Exit the application.
redirect Redirect to another URL.
enqueueMessage Enqueue a system message.
getMessageQueue Get the system message queue.
getCfg
getName Method to get the application name.
getUserState Gets a user state.
setUserState Sets the value of a user state variable.
getUserStateFromRequest Gets the value of a user state variable.
login Login authentication function.
logout Logout authentication function.
getTemplate Gets the name of the current template.
getPathway Returns the application JPathway object.
getMenu Returns the application JPathway object.
getClientId Gets the client id of the current running application.
isAdmin Is admin interface?
isSite Is site interface?
__toString Returns the response
getInstance Returns the global JApplication object, only creating it if it doesn't already exist.
registerEvent Registers a handler to a particular event group.
triggerEvent Calls all handlers associated with an event group.
getRouter Returns the application JRouter object.
stringURLSafe This method transliterates a string into an URL safe string or returns a URL safe UTF-8 string based on the global configuration
getHash Provides a secure hash based on a seed
isWinOS Method to determine if the host OS is Windows

Importing[edit]

jimport( 'joomla.application.application' );


See Also[edit]

Examples[edit]

Code Examples[edit]