Liste de tous les membres
Fonctions membres publiques |
| __construct (JInput $input=null, JRegistry $config=null, JWebClient $client=null) |
| initialise ($session=null, $document=null, $language=null, $dispatcher=null) |
| execute () |
| redirect ($url, $moved=false) |
| close ($code=0) |
| loadConfiguration ($data) |
| registerEvent ($event, $handler) |
| triggerEvent ($event, array $args=null) |
| 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 () |
Attributs protégés statiques |
static | $instance |
Documentation des constructeurs et destructeur
Class constructor.
- Paramètres:
-
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 JWebClient object that object will become the application's client object, otherwise a default client object is created. |
- Depuis:
- 11.3
Références $client, et $config.
Documentation des fonctions membres
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.
- Paramètres:
-
boolean | $allow | True to allow browser caching. |
- Renvoie:
- boolean
- Depuis:
- 11.3
JApplicationWeb::appendBody |
( |
|
$content | ) |
|
Append content to the body content
- Paramètres:
-
string | $content | The content to append to the response body. |
- Renvoie:
- JApplicationWeb Instance of $this to allow chaining.
- Depuis:
- 11.3
JApplicationWeb::checkConnectionAlive |
( |
| ) |
|
|
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.
- Renvoie:
- boolean True if the connection is valid and normal.
- Voir également:
- connection_status()
- Depuis:
- 11.3
JApplicationWeb::checkHeadersSent |
( |
| ) |
|
|
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.
- Renvoie:
- boolean True if the headers have already been sent.
- Voir également:
- headers_sent()
- Depuis:
- 11.3
JApplicationWeb::clearHeaders |
( |
| ) |
|
Method to clear any set response headers.
- Renvoie:
- JApplicationWeb Instance of $this to allow chaining.
- Depuis:
- 11.3
JApplicationWeb::close |
( |
|
$code = 0 | ) |
|
Exit the application.
- Paramètres:
-
integer | $code | The exit code (optional; default is 0). |
- Renvoie:
- void
- Depuis:
- 11.3
JApplicationWeb::compress |
( |
| ) |
|
|
protected |
Checks the accept encoding of the browser and compresses the data before sending it to the client if possible.
- Renvoie:
- void
- Depuis:
- 11.3
Références $data.
JApplicationWeb::detectRequestUri |
( |
| ) |
|
|
protected |
Method to detect the requested URI from server environment variables.
- Renvoie:
- string The requested URI
- Depuis:
- 11.3
JApplicationWeb::doExecute |
( |
| ) |
|
|
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.
- Renvoie:
- void
- Depuis:
- 11.3
JApplicationWeb::execute |
( |
| ) |
|
Execute the application.
- Renvoie:
- void
- Depuis:
- 11.3
JApplicationWeb::fetchConfigurationData |
( |
|
$file = '' , |
|
|
|
$class = 'JConfig' |
|
) |
| |
|
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.
- Paramètres:
-
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. |
- Renvoie:
- mixed Either an array or object to be loaded into the configuration object.
- Depuis:
- 11.3
Références $class, $config, $file, JPATH_BASE, et JLoader\register().
JApplicationWeb::get |
( |
|
$key, |
|
|
|
$default = null |
|
) |
| |
Returns a property of the object or the default value if the property is not set.
- Paramètres:
-
string | $key | The name of the property. |
mixed | $default | The default value (optional) if none is set. |
- Renvoie:
- mixed The value of the configuration.
- Depuis:
- 11.3
JApplicationWeb::getBody |
( |
|
$asArray = false | ) |
|
Return the body content
- Paramètres:
-
boolean | $asArray | True to return the body as an array of strings. |
- Renvoie:
- mixed The response body either as an array or concatenated string.
- Depuis:
- 11.3
JApplicationWeb::getDocument |
( |
| ) |
|
Method to get the application document object.
- Renvoie:
- JDocument The document object
- Depuis:
- 11.3
JApplicationWeb::getHeaders |
( |
| ) |
|
Method to get the array of response headers to be sent when the response is sent to the client.
- Renvoie:
- array
- Depuis:
- 11.3
static JApplicationWeb::getInstance |
( |
|
$name = null | ) |
|
|
static |
JApplicationWeb::getLanguage |
( |
| ) |
|
Method to get the application language object.
- Renvoie:
- JLanguage The language object
- Depuis:
- 11.3
JApplicationWeb::getSession |
( |
| ) |
|
Method to get the application session object.
- Renvoie:
- JSession The session object
- Depuis:
- 11.3
JApplicationWeb::header |
( |
|
$string, |
|
|
|
$replace = true , |
|
|
|
$code = null |
|
) |
| |
|
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.
- Paramètres:
-
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. |
- Renvoie:
- void
- Voir également:
- header()
- Depuis:
- 11.3
JApplicationWeb::initialise |
( |
|
$session = null , |
|
|
|
$document = null , |
|
|
|
$language = null , |
|
|
|
$dispatcher = null |
|
) |
| |
Initialise the application.
- Paramètres:
-
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 JDispatcher 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. |
- Renvoie:
- JApplicationWeb Instance of $this to allow chaining.
- Voir également:
- loadSession()
-
loadDocument()
-
loadLanguage()
-
loadDispatcher()
- Depuis:
- 11.3
Références $dispatcher, $language, elseif, et language.
JApplicationWeb::loadConfiguration |
( |
|
$data | ) |
|
Load an object or array into the application configuration object.
- Paramètres:
-
mixed | $data | Either an array or object to be loaded into the configuration object. |
- Renvoie:
- JApplicationWeb Instance of $this to allow chaining.
- Depuis:
- 11.3
JApplicationWeb::loadDispatcher |
( |
| ) |
|
|
protected |
Method to create an event dispatcher for the Web application. 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 event dispatchers based on more specific needs.
- Renvoie:
- void
- Depuis:
- 11.3
Références JDispatcher\getInstance().
JApplicationWeb::loadDocument |
( |
| ) |
|
|
protected |
Method to create a document for the Web application. 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 document objects based on more specific needs.
- Renvoie:
- void
- Depuis:
- 11.3
Références JFactory\getDocument().
JApplicationWeb::loadLanguage |
( |
| ) |
|
|
protected |
Method to create a language for the Web application. 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 language objects based on more specific needs.
- Renvoie:
- void
- Depuis:
- 11.3
Références JFactory\getLanguage(), et language.
JApplicationWeb::loadSession |
( |
| ) |
|
|
protected |
Method to create a session for the Web application. 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 session objects based on more specific needs.
- Renvoie:
- void
- Depuis:
- 11.3
Références $name, $options, et JSession\getInstance().
JApplicationWeb::loadSystemUris |
( |
|
$requestUri = null | ) |
|
|
protected |
Method to load the system URI strings for the application.
- Paramètres:
-
string | $requestUri | An optional request URI to use instead of detecting one from the server environment variables. |
- Renvoie:
- void
- Depuis:
- 11.3
Références $path, et $uri.
JApplicationWeb::prependBody |
( |
|
$content | ) |
|
Prepend content to the body content
- Paramètres:
-
string | $content | The content to prepend to the response body. |
- Renvoie:
- JApplicationWeb Instance of $this to allow chaining.
- Depuis:
- 11.3
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.
- Paramètres:
-
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. |
- Renvoie:
- void
- Depuis:
- 11.3
Références $html, $parts, $path, $uri, $url, JURI\getInstance(), jimport(), text, JWebClient\TRIDENT, et utf8_is_ascii().
JApplicationWeb::registerEvent |
( |
|
$event, |
|
|
|
$handler |
|
) |
| |
Registers a handler to a particular event group.
- Paramètres:
-
string | $event | The event name. |
callback | $handler | The handler, a function or an instance of a event object. |
- Renvoie:
- JApplicationWeb Instance of $this to allow chaining.
- Depuis:
- 11.3
JApplicationWeb::render |
( |
| ) |
|
|
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.
- Renvoie:
- void
- Depuis:
- 11.3
Références $data, $options, et JPATH_BASE.
JApplicationWeb::respond |
( |
| ) |
|
|
protected |
Method to send the application response to the client. All headers will be sent prior to the main application output data.
- Renvoie:
- void
- Depuis:
- 11.3
JApplicationWeb::sendHeaders |
( |
| ) |
|
Send the response headers.
- Renvoie:
- JApplicationWeb Instance of $this to allow chaining.
- Depuis:
- 11.3
JApplicationWeb::set |
( |
|
$key, |
|
|
|
$value = null |
|
) |
| |
Modifies a property of the object, creating it if it does not already exist.
- Paramètres:
-
string | $key | The name of the property. |
mixed | $value | The value of the property to set (optional). |
- Renvoie:
- mixed Previous value of the property
- Depuis:
- 11.3
JApplicationWeb::setBody |
( |
|
$content | ) |
|
Set body content. If body content already defined, this will replace it.
- Paramètres:
-
string | $content | The content to set as the response body. |
- Renvoie:
- JApplicationWeb Instance of $this to allow chaining.
- Depuis:
- 11.3
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.
- Paramètres:
-
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. |
- Renvoie:
- JApplicationWeb Instance of $this to allow chaining.
- Depuis:
- 11.3
JApplicationWeb::triggerEvent |
( |
|
$event, |
|
|
array |
$args = null |
|
) |
| |
Calls all handlers associated with an event group.
- Paramètres:
-
string | $event | The event name. |
array | $args | An array of arguments (optional). |
- Renvoie:
- array An array of results from each function call, or null if no dispatcher is defined.
- Depuis:
- 11.3
Documentation des données membres
JApplicationWeb::$charSet = 'utf-8' |
JApplicationWeb::$dispatcher |
|
protected |
JApplicationWeb::$document |
|
protected |
JApplicationWeb::$instance |
|
staticprotected |
JApplicationWeb::$language |
|
protected |
JApplicationWeb::$mimeType = 'text/html' |
JApplicationWeb::$modifiedDate |
JApplicationWeb::$response |
|
protected |
JApplicationWeb::$session |
|
protected |
La documentation de cette classe a été générée à partir du fichier suivant :