Joomla Platform
13.1
Documentation des API du framework Joomla Platform
|
Fonctions membres publiques | |
__construct (JInput $input=null, JRegistry $config=null, JApplicationWebClient $client=null) | |
initialise ($session=null, $document=null, $language=null, $dispatcher=null) | |
execute () | |
redirect ($url, $moved=false) | |
loadConfiguration ($data) | |
get ($key, $default=null) | |
set ($key, $value=null) | |
allowCache ($allow=null) | |
setHeader ($name, $value, $replace=false) | |
getHeaders () | |
clearHeaders () | |
sendHeaders () | |
setBody ($content) | |
prependBody ($content) | |
appendBody ($content) | |
getBody ($asArray=false) | |
getDocument () | |
getLanguage () | |
getSession () | |
flushAssets () | |
isSSLConnection () | |
loadDocument (JDocument $document=null) | |
loadLanguage (JLanguage $language=null) | |
loadSession (JSession $session=null) | |
afterSessionStart () | |
Fonctions membres publiques inherited from JApplicationBase | |
close ($code=0) | |
getIdentity () | |
registerEvent ($event, $handler) | |
triggerEvent ($event, array $args=null) | |
loadDispatcher (JEventDispatcher $dispatcher=null) | |
loadIdentity (JUser $identity=null) |
Fonctions membres publiques statiques | |
static | getInstance ($name=null) |
Attributs publics | |
$charSet = 'utf-8' | |
$mimeType = 'text/html' | |
$modifiedDate | |
$client | |
Attributs publics inherited from JApplicationBase | |
$input = null |
Fonctions membres protégées | |
doExecute () | |
render () | |
compress () | |
respond () | |
checkConnectionAlive () | |
checkHeadersSent () | |
detectRequestUri () | |
fetchConfigurationData ($file= '', $class= 'JConfig') | |
header ($string, $replace=true, $code=null) | |
loadSystemUris ($requestUri=null) |
Attributs protégés | |
$config | |
$document | |
$language | |
$session | |
$response | |
Attributs protégés inherited from JApplicationBase | |
$dispatcher | |
$identity |
Attributs protégés statiques | |
static | $instance |
JApplicationWeb::__construct | ( | JInput | $input = null , |
JRegistry | $config = null , |
||
JApplicationWebClient | $client = null |
||
) |
Class constructor.
mixed | $input | An optional argument to provide dependency injection for the application's input object. If the argument is a JInput object that object will become the application's input object, otherwise a default input object is created. |
mixed | $config | An optional argument to provide dependency injection for the application's config object. If the argument is a JRegistry object that object will become the application's config object, otherwise a default config object is created. |
mixed | $client | An optional argument to provide dependency injection for the application's client object. If the argument is a JApplicationWebClient object that object will become the application's client object, otherwise a default client object is created. |
Réimplémentée dans JWeb.
Définition à la ligne 96 du fichier web.php.
JApplicationWeb::afterSessionStart | ( | ) |
After the session has been started we need to populate it with some default values.
Définition à la ligne 1087 du fichier web.php.
Références JFactory\getSession().
JApplicationWeb::allowCache | ( | $allow = null | ) |
Set/get cachable state for the response. If $allow is set, sets the cachable state of the response. Always returns the current state.
boolean | $allow | True to allow browser caching. |
Définition à la ligne 607 du fichier web.php.
JApplicationWeb::appendBody | ( | $content | ) |
Append content to the body content
string | $content | The content to append to the response body. |
Définition à la ligne 753 du fichier web.php.
|
protected |
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.
Définition à la ligne 820 du fichier web.php.
|
protected |
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.
Définition à la ligne 835 du fichier web.php.
JApplicationWeb::clearHeaders | ( | ) |
Method to clear any set response headers.
Définition à la ligne 677 du fichier web.php.
|
protected |
Checks the accept encoding of the browser and compresses the data before sending it to the client if possible.
Définition à la ligne 342 du fichier web.php.
|
protected |
Method to detect the requested URI from server environment variables.
Définition à la ligne 847 du fichier web.php.
|
protected |
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.
Définition à la ligne 291 du fichier web.php.
JApplicationWeb::execute | ( | ) |
Execute the application.
Définition à la ligne 241 du fichier web.php.
|
protected |
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.
string | $file | The path and filename of the configuration file. If not provided, configuration.php in JPATH_BASE will be used. |
string | $class | The class name to instantiate. |
RuntimeException |
Définition à la ligne 901 du fichier web.php.
Références JLoader\register().
JApplicationWeb::flushAssets | ( | ) |
JApplicationWeb::get | ( | $key, | |
$default = null |
|||
) |
Returns a property of the object or the default value if the property is not set.
string | $key | The name of the property. |
mixed | $default | The default value (optional) if none is set. |
Définition à la ligne 574 du fichier web.php.
JApplicationWeb::getBody | ( | $asArray = false | ) |
Return the body content
boolean | $asArray | True to return the body as an array of strings. |
Définition à la ligne 769 du fichier web.php.
JApplicationWeb::getDocument | ( | ) |
JApplicationWeb::getHeaders | ( | ) |
|
static |
Returns a reference to the global JApplicationWeb object, only creating it if it doesn't already exist.
This method must be invoked as: $web = JApplicationWeb::getInstance();
string | $name | The name (optional) of the JApplicationWeb class to instantiate. |
Définition à la ligne 159 du fichier web.php.
JApplicationWeb::getLanguage | ( | ) |
JApplicationWeb::getSession | ( | ) |
|
protected |
Method to send a header to the client. We are wrapping this to isolate the header() function from our code base for testing reasons.
string | $string | The header string. |
boolean | $replace | The optional replace parameter indicates whether the header should replace a previous similar header, or add a second header of the same type. |
integer | $code | Forces the HTTP response code to the specified value. Note that this parameter only has an effect if the string is not empty. |
JApplicationWeb::initialise | ( | $session = null , |
|
$document = null , |
|||
$language = null , |
|||
$dispatcher = null |
|||
) |
Initialise the application.
mixed | $session | An optional argument to provide dependency injection for the application's session object. If the argument is a JSession object that object will become the application's session object, if it is false then there will be no session object, and if it is null then the default session object will be created based on the application's loadSession() method. |
mixed | $document | An optional argument to provide dependency injection for the application's document object. If the argument is a JDocument object that object will become the application's document object, if it is false then there will be no document object, and if it is null then the default document object will be created based on the application's loadDocument() method. |
mixed | $language | An optional argument to provide dependency injection for the application's language object. If the argument is a JLanguage object that object will become the application's language object, if it is false then there will be no language object, and if it is null then the default language object will be created based on the application's loadLanguage() method. |
mixed | $dispatcher | An optional argument to provide dependency injection for the application's event dispatcher. If the argument is a JEventDispatcher object that object will become the application's event dispatcher, if it is null then the default event dispatcher will be created based on the application's loadDispatcher() method. |
Définition à la ligne 209 du fichier web.php.
JApplicationWeb::isSSLConnection | ( | ) |
JApplicationWeb::loadConfiguration | ( | $data | ) |
Load an object or array into the application configuration object.
mixed | $data | Either an array or object to be loaded into the configuration object. |
Définition à la ligne 549 du fichier web.php.
JApplicationWeb::loadDocument | ( | JDocument | $document = null | ) |
Allows the application to load a custom or default document.
The logic and options for creating this object are adequately generic for default cases but for many applications it will make sense to override this method and create a document, if required, based on more specific needs.
JDocument | $document | An optional document object. If omitted, the factory document is created. |
Définition à la ligne 994 du fichier web.php.
Références JFactory\getDocument().
JApplicationWeb::loadLanguage | ( | JLanguage | $language = null | ) |
Allows the application to load a custom or default language.
The logic and options for creating this object are adequately generic for default cases but for many applications it will make sense to override this method and create a language, if required, based on more specific needs.
JLanguage | $language | An optional language object. If omitted, the factory language is created. |
Définition à la ligne 1014 du fichier web.php.
Références JFactory\getLanguage().
JApplicationWeb::loadSession | ( | JSession | $session = null | ) |
Allows the application to load a custom or default session.
The logic and options for creating this object are adequately generic for default cases but for many applications it will make sense to override this method and create a session, if required, based on more specific needs.
JSession | $session | An optional session object. If omitted, the session is created. |
Définition à la ligne 1034 du fichier web.php.
Références JSession\getInstance().
|
protected |
Method to load the system URI strings for the application.
string | $requestUri | An optional request URI to use instead of detecting one from the server environment variables. |
Définition à la ligne 1108 du fichier web.php.
Références JUri\getInstance().
JApplicationWeb::prependBody | ( | $content | ) |
Prepend content to the body content
string | $content | The content to prepend to the response body. |
Définition à la ligne 737 du fichier web.php.
JApplicationWeb::redirect | ( | $url, | |
$moved = false |
|||
) |
Redirect to another URL.
If the headers have not been sent the redirect will be accomplished using a "301 Moved Permanently" or "303 See Other" code in the header pointing to the new location. If the headers have already been sent this will be accomplished using a JavaScript statement.
string | $url | The URL to redirect to. Can only be http/https URL |
boolean | $moved | True if the page is 301 Permanently Moved, otherwise 303 See Other is assumed. |
Définition à la ligne 466 du fichier web.php.
Références JUri\base(), JUri\getInstance(), jimport(), JApplicationWebClient\TRIDENT, et utf8_is_ascii().
|
protected |
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.
Définition à la ligne 305 du fichier web.php.
|
protected |
Method to send the application response to the client. All headers will be sent prior to the main application output data.
Définition à la ligne 417 du fichier web.php.
JApplicationWeb::sendHeaders | ( | ) |
Send the response headers.
Définition à la ligne 691 du fichier web.php.
JApplicationWeb::set | ( | $key, | |
$value = null |
|||
) |
Modifies a property of the object, creating it if it does not already exist.
string | $key | The name of the property. |
mixed | $value | The value of the property to set (optional). |
Définition à la ligne 589 du fichier web.php.
JApplicationWeb::setBody | ( | $content | ) |
Set body content. If body content already defined, this will replace it.
string | $content | The content to set as the response body. |
Définition à la ligne 721 du fichier web.php.
JApplicationWeb::setHeader | ( | $name, | |
$value, | |||
$replace = false |
|||
) |
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.
string | $name | The name of the header to set. |
string | $value | The value of the header to set. |
boolean | $replace | True to replace any headers with the same name. |
Définition à la ligne 630 du fichier web.php.