\JApplication
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.
Synopsis
class JApplication
extends JApplicationBase
{
- // members
- protected $_clientId;
- protected $_messageQueue;
- protected $_name;
- public $scope;
- public date $requestTime;
- public $startTime;
- public JApplicationWebClient $client;
- protected $instances;
- // Inherited members from JApplicationBase
- protected JEventDispatcher $dispatcher;
- protected JUser $identity;
- public JInput $input;
- // methods
- public void __construct()
- public static JApplicationCms getInstance()
- public void initialise()
- public void route()
- public void dispatch()
- public void render()
- public void redirect()
- public void enqueueMessage()
- public array getMessageQueue()
- public mixed getCfg()
- public string getName()
- public mixed getUserState()
- public mixed setUserState()
- public The getUserStateFromRequest()
- public boolean login()
- public boolean logout()
- public mixed getTemplate()
- public static JRouter getRouter()
- public static string stringURLSafe()
- public JPathway getPathway()
- public JMenu getMenu()
- public static string getHash()
- protected JConfig _createConfiguration()
- protected JSession _createSession()
- public void checkSession()
- public void afterSessionStart()
- public integer getClientId()
- public boolean isAdmin()
- public boolean isSite()
- public static boolean isWinOS()
- public boolean isSSLConnection()
- public string __toString()
- // Inherited methods from JApplicationBase
- public void close()
- public mixed getIdentity()
- public JApplicationBase registerEvent()
- public array triggerEvent()
- public JApplicationBase loadDispatcher()
- public JApplicationBase loadIdentity()
Hierarchy
Extends
Tasks
Tasks
Line | Task |
---|---|
991 | At some point we need to get away from having session data always in the db. |
Members
protected
- $_clientId
—
integer
The client identifier. - $_messageQueue
—
array
The application message queue. - $_name
—
array
The name of the application. - $dispatcher
—
JEventDispatcher
The application dispatcher object. - $identity
—
JUser
The application identity object. - $instances — array
public
- $client — JApplicationWebClient
- $input
—
JInput
The application input object. - $requestTime
—
date
The time the request was made. - $scope
—
string
The scope of the application. - $startTime
—
integer
The time the request was made as Unix timestamp.
Methods
protected
- _createConfiguration() — Create the configuration registry.
- _createSession() — Create the user session.
public
- __construct() — Class constructor.
- __toString() — Returns the response as a string.
- afterSessionStart() — After the session has been started we need to populate it with some default values.
- checkSession() — Checks the user session.
- dispatch() — Dispatch the application.
- enqueueMessage() — Enqueue a system message.
- getCfg() — Gets a configuration value.
- getClientId() — Gets the client id of the current running application.
- getHash() — Provides a secure hash based on a seed
- getInstance() — Returns the global JApplicationCms object, only creating it if it doesn't already exist.
- getMenu() — Returns the application JPathway object.
- getMessageQueue() — Get the system message queue.
- getName() — Method to get the application name.
- getPathway() — Returns the application JPathway object.
- getRouter() — Returns the application JRouter object.
- getTemplate() — Gets the name of the current template.
- getUserState() — Gets a user state.
- getUserStateFromRequest() — Gets the value of a user state variable.
- initialise() — Initialise the application.
- isAdmin() — Is admin interface?
- isSSLConnection() — Determine if we are using a secure (SSL) connection.
- isSite() — Is site interface?
- isWinOS() — Method to determine if the host OS is Windows
- login() — Login authentication function.
- logout() — Logout authentication function.
- redirect() — Redirect to another URL.
- render() — Render the application.
- route() — Route the application.
- setUserState() — Sets the value of a user state variable.
- stringURLSafe() — This method transliterates a string into an URL safe string or returns a URL safe UTF-8 string based on the global configuration
Inherited from JApplicationBase
public
- close() — Method to close the application.
- getIdentity() — Get the application identity.
- loadDispatcher() — Allows the application to load a custom or default dispatcher.
- loadIdentity() — Allows the application to load a custom or default identity.
- registerEvent() — Registers a handler to a particular event group.
- triggerEvent() — Calls all handlers associated with an event group.