Base class for a Joomla! application.
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.
Located in /libraries/legacy/application/application.php (line 26)
JApplicationBase | --JApplication
The time the request was made.
The scope of the application.
The time the request was made as Unix timestamp.
The client identifier.
The application message queue.
The name of the application.
Inherited from JApplicationBase
JApplicationBase::$dispatcher
JApplicationBase::$identity
JApplicationBase::$input
Provides a secure hash based on a seed
Returns the global JApplicationCms object, only creating it if it doesn't already exist.
Returns the application JRouter object.
This method transliterates a string into an URL safe string or returns a URL safe UTF-8 string based on the global configuration
Class constructor.
After the session has been started we need to populate it with some default values.
Checks the user session.
If the session record doesn't exist, initialise it. If session is new, create session variables
Dispatch the application.
Dispatching is the process of pulling the option from the request object and mapping them to a component. If the component does not exist, it handles determining a default component to dispatch.
Enqueue a system message.
Gets a configuration value.
An example is in application/japplication-getcfg.php Getting a configuration
Gets the client id of the current running application.
Returns the application JPathway object.
Method to get the application name.
The dispatcher name is by default parsed using the classname, or it can be set by passing a $config['name'] in the class constructor.
Returns the application JPathway object.
Gets the name of the current template.
Gets a user state.
Gets the value of a user state variable.
Initialise the application.
Determine if we are using a secure (SSL) connection.
Login authentication function.
Username and encoded password are passed the onUserLogin event which is responsible for the user validation. A successful validation updates the current session record with the user's details.
Username and encoded password are sent as credentials (along with other possibilities) to each observer (authentication plugin) for user validation. Successful validation will update the current session with the user details.
Logout authentication function.
Passed the current user information to the onUserLogout event and reverts the current session record back to 'anonymous' parameters. If any of the authentication plugins did not successfully complete the logout routine then the whole method fails. Any errors raised should be done in the plugin as this provides the ability to give much more information about why the routine may have failed.
Redirect to another URL.
Optionally enqueues a message in the system message queue (which will be displayed the next time a page is loaded) using the enqueueMessage method. If the headers have not been sent the redirect will be accomplished using a "301 Moved Permanently" code in the header pointing to the new location. If the headers have already been sent this will be accomplished using a JavaScript statement.
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.
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.
Sets the value of a user state variable.
Create the configuration registry.
Create the user session.
Old sessions are flushed based on the configuration value for the cookie lifetime. If an existing session, then the last access time is updated. If a new session, a session id is generated and a record is created in the #__sessions table.
Inherited From JApplicationBase
JApplicationBase::close()
JApplicationBase::getIdentity()
JApplicationBase::loadDispatcher()
JApplicationBase::loadIdentity()
JApplicationBase::registerEvent()
JApplicationBase::triggerEvent()
Documentation generated on Tue, 19 Nov 2013 14:53:46 +0100 by phpDocumentor 1.4.3