\JApplicationWeb
Base class for a Joomla! Web application.
Synopsis
class JApplicationWeb
extends JApplicationBase
{
- // members
- public $charSet;
- public $mimeType;
- public JDate $modifiedDate;
- public JApplicationWebClient $client;
- protected JRegistry $config;
- protected JDocument $document;
- protected JLanguage $language;
- protected JSession $session;
- protected $response;
- protected JApplicationWeb $instance;
- // Inherited members from JApplicationBase
- protected JEventDispatcher $dispatcher;
- protected JUser $identity;
- public JInput $input;
- // methods
- public void __construct()
- public static JApplicationWeb getInstance()
- public JApplicationWeb initialise()
- public void execute()
- protected void doExecute()
- protected void render()
- protected void compress()
- protected void respond()
- public void redirect()
- public JApplicationWeb loadConfiguration()
- public mixed get()
- public mixed set()
- public boolean allowCache()
- public JApplicationWeb setHeader()
- public array getHeaders()
- public JApplicationWeb clearHeaders()
- public JApplicationWeb sendHeaders()
- public JApplicationWeb setBody()
- public JApplicationWeb prependBody()
- public JApplicationWeb appendBody()
- public mixed getBody()
- public JDocument getDocument()
- public JLanguage getLanguage()
- public JSession getSession()
- protected boolean checkConnectionAlive()
- protected boolean checkHeadersSent()
- protected string detectRequestUri()
- protected mixed fetchConfigurationData()
- public void flushAssets()
- protected void header()
- public boolean isSSLConnection()
- public JApplicationWeb loadDocument()
- public JApplicationWeb loadLanguage()
- public JApplicationWeb loadSession()
- public void afterSessionStart()
- protected void loadSystemUris()
- // Inherited methods from JApplicationBase
- public void close()
- public mixed getIdentity()
- public JApplicationBase registerEvent()
- public array triggerEvent()
- public JApplicationBase loadDispatcher()
- public JApplicationBase loadIdentity()
Hierarchy
Extends
Extended by
Members
protected
- $config — JRegistry
- $dispatcher
—
JEventDispatcher
The application dispatcher object. - $document — JDocument
- $identity
—
JUser
The application identity object. - $instance — JApplicationWeb
- $language — JLanguage
- $response —
- $session — JSession
public
- $charSet — string
- $client — JApplicationWebClient
- $input
—
JInput
The application input object. - $mimeType — string
- $modifiedDate — JDate
Methods
protected
- checkConnectionAlive() — Method to check the current client connnection status to ensure that it is alive. We are wrapping this to isolate the connection_status() function from our code base for testing reasons.
- checkHeadersSent() — Method to check to see if headers have already been sent. We are wrapping this to isolate the headers_sent() function from our code base for testing reasons.
- compress() — Checks the accept encoding of the browser and compresses the data before sending it to the client if possible.
- detectRequestUri() — Method to detect the requested URI from server environment variables.
- doExecute() — Method to run the Web application routines. Most likely you will want to instantiate a controller and execute it, or perform some sort of action that populates a JDocument object so that output can be rendered to the client.
- fetchConfigurationData() — Method to load a PHP configuration class file based on convention and return the instantiated data object. You will extend this method in child classes to provide configuration data from whatever data source is relevant for your specific application.
- header() — Method to send a header to the client. We are wrapping this to isolate the header() function from our code base for testing reasons.
- loadSystemUris() — Method to load the system URI strings for the application.
- render() — Rendering is the process of pushing the document buffers into the template placeholders, retrieving data from the document and pushing it into the application response buffer.
- respond() — Method to send the application response to the client. All headers will be sent prior to the main application output data.
public
- __construct() — Class constructor.
- afterSessionStart() — After the session has been started we need to populate it with some default values.
- allowCache() — Set/get cachable state for the response. If $allow is set, sets the cachable state of the response. Always returns the current state.
- appendBody() — Append content to the body content
- clearHeaders() — Method to clear any set response headers.
- execute() — Execute the application.
- flushAssets() — Flush the media version to refresh versionable assets
- get() — Returns a property of the object or the default value if the property is not set.
- getBody() — Return the body content
- getDocument() — Method to get the application document object.
- getHeaders() — Method to get the array of response headers to be sent when the response is sent to the client.
- getInstance() — Returns a reference to the global JApplicationWeb object, only creating it if it doesn't already exist.
- getLanguage() — Method to get the application language object.
- getSession() — Method to get the application session object.
- initialise() — Initialise the application.
- isSSLConnection() — Determine if we are using a secure (SSL) connection.
- loadConfiguration() — Load an object or array into the application configuration object.
- loadDocument() — Allows the application to load a custom or default document.
- loadLanguage() — Allows the application to load a custom or default language.
- loadSession() — Allows the application to load a custom or default session.
- prependBody() — Prepend content to the body content
- redirect() — Redirect to another URL.
- sendHeaders() — Send the response headers.
- set() — Modifies a property of the object, creating it if it does not already exist.
- setBody() — Set body content. If body content already defined, this will replace it.
- setHeader() — Method to set a response header. If the replace flag is set then all headers with the given name will be replaced by the new one. The headers are stored in an internal array to be sent when the site is sent to the browser.
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.