Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
__construct (Input $input=null, Registry $config=null, Web\WebClient $client=null) | |
execute () | |
redirect ($url, $status=303) | |
allowCache ($allow=null) | |
setHeader ($name, $value, $replace=false) | |
getHeaders () | |
clearHeaders () | |
sendHeaders () | |
setBody ($content) | |
prependBody ($content) | |
appendBody ($content) | |
getBody ($asArray=false) | |
getSession () | |
isValidHttpStatus ($code) | |
isSslConnection () | |
setSession (Session $session) | |
checkToken ($method='post') | |
getFormToken ($forceNew=false) | |
Fonctions membres publiques hérités de AbstractApplication | |
__construct (Input $input=null, Registry $config=null) | |
close ($code=0) | |
execute () | |
get ($key, $default=null) | |
getLogger () | |
set ($key, $value=null) | |
setConfiguration (Registry $config) | |
setLogger (LoggerInterface $logger) | |
Fonctions membres publiques statiques | |
static | isAscii ($str) |
Champs de données | |
$charSet = 'utf-8' | |
$mimeType = 'text/html' | |
$httpVersion = '1.1' | |
$modifiedDate | |
$client | |
Champs de données hérités de AbstractApplication | |
$input | |
Fonctions membres protégées | |
compress () | |
respond () | |
getHttpStatusValue ($value) | |
checkConnectionAlive () | |
checkHeadersSent () | |
detectRequestUri () | |
header ($string, $replace=true, $code=null) | |
isRedirectState ($state) | |
loadSystemUris ($requestUri=null) | |
Fonctions membres protégées hérités de AbstractApplication | |
doExecute () | |
initialise () | |
Attributs protégés | |
$response | |
Attributs protégés hérités de AbstractApplication | |
$config | |
Attributs privés | |
$session | |
$responseMap | |
Base class for a Joomla! Web application.
Class constructor.
Input | $input | An optional argument to provide dependency injection for the application's input object. If the argument is an Input object that object will become the application's input object, otherwise a default input object is created. |
Registry | $config | An optional argument to provide dependency injection for the application's config object. If the argument is a Registry object that object will become the application's config object, otherwise a default config object is created. |
Web\WebClient | $client | An optional argument to provide dependency injection for the application's client object. If the argument is a Web object that object will become the application's client object, otherwise a default client object is created. |
Références AbstractWebApplication\$client, AbstractApplication\$config, AbstractApplication\$input, et AbstractWebApplication\loadSystemUris().
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. |
Références null.
Référencé par AbstractWebApplication\respond().
appendBody | ( | $content | ) |
Append content to the body content
string | $content | The content to append to the response body. |
Références $content.
|
protected |
Method to check the current client connection status to ensure that it is alive. We are wrapping this to isolate the connection_status() function from our code base for testing reasons.
Référencé par AbstractWebApplication\compress().
|
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.
Référencé par AbstractWebApplication\compress(), AbstractWebApplication\redirect(), et AbstractWebApplication\sendHeaders().
checkToken | ( | $method = 'post' | ) |
Checks for a form token in the request.
Use in conjunction with getFormToken.
string | $method | The request method in which to look for the token key. |
Références AbstractApplication\close(), AbstractWebApplication\getFormToken(), AbstractWebApplication\getSession(), et AbstractWebApplication\redirect().
clearHeaders | ( | ) |
Method to clear any set response headers.
|
protected |
Checks the accept encoding of the browser and compresses the data before sending it to the client if possible.
Références $data, AbstractWebApplication\checkConnectionAlive(), AbstractWebApplication\checkHeadersSent(), AbstractWebApplication\getBody(), AbstractWebApplication\setBody(), et AbstractWebApplication\setHeader().
Référencé par AbstractWebApplication\execute().
|
protected |
Method to detect the requested URI from server environment variables.
Références $uri, et AbstractWebApplication\isSslConnection().
Référencé par AbstractWebApplication\loadSystemUris().
execute | ( | ) |
Execute the application.
Références AbstractWebApplication\compress(), AbstractApplication\doExecute(), et AbstractWebApplication\respond().
getBody | ( | $asArray = false | ) |
Return the body content
boolean | $asArray | True to return the body as an array of strings. |
Référencé par AbstractWebApplication\compress(), et AbstractWebApplication\respond().
getFormToken | ( | $forceNew = false | ) |
Method to determine a hash for anti-spoofing variable names
boolean | $forceNew | If true, force a new token to be created |
Références $userId, et AbstractWebApplication\getSession().
Référencé par AbstractWebApplication\checkToken().
getHeaders | ( | ) |
Method to get the array of response headers to be sent when the response is sent to the client.
|
protected |
Check if a given value can be successfully mapped to a valid http status value
string | int | $value | The given status as int or string |
Références $value.
Référencé par AbstractWebApplication\sendHeaders().
getSession | ( | ) |
Method to get the application session object.
Références AbstractWebApplication\$session, et null.
Référencé par AbstractWebApplication\checkToken(), et AbstractWebApplication\getFormToken().
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. |
Référencé par AbstractWebApplication\sendHeaders().
|
static |
Tests whether a string contains only 7bit ASCII bytes.
You might use this to conditionally check whether a string needs handling as UTF-8 or not, potentially offering performance benefits by using the native PHP equivalent if it's just ASCII e.g.;
string | $str | The string to test. |
|
protected |
Checks if a state is a redirect state
integer | $state | The HTTP status code. |
Références $state.
Référencé par AbstractWebApplication\redirect().
isSslConnection | ( | ) |
Determine if we are using a secure (SSL) connection.
Référencé par AbstractWebApplication\detectRequestUri().
isValidHttpStatus | ( | $code | ) |
Check if the value is a valid HTTP status code
integer | $code | The potential status code |
|
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. |
Références $path, $uri, et AbstractWebApplication\detectRequestUri().
Référencé par AbstractWebApplication\__construct().
prependBody | ( | $content | ) |
Prepend content to the body content
string | $content | The content to prepend to the response body. |
Références $content.
redirect | ( | $url, | |
$status = 303 |
|||
) |
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 |
integer | $status | The HTTP status code to be provided. 303 is assumed by default. |
Références $html, $parts, $path, $prefix, $uri, $url, AbstractWebApplication\checkHeadersSent(), AbstractApplication\close(), AbstractWebApplication\isRedirectState(), json_encode, AbstractWebApplication\respond(), et AbstractWebApplication\setHeader().
Référencé par AbstractWebApplication\checkToken().
|
protected |
Method to send the application response to the client. All headers will be sent prior to the main application output data.
Références AbstractWebApplication\allowCache(), AbstractWebApplication\getBody(), AbstractWebApplication\sendHeaders(), et AbstractWebApplication\setHeader().
Référencé par AbstractWebApplication\execute(), et AbstractWebApplication\redirect().
sendHeaders | ( | ) |
Send the response headers.
Références AbstractWebApplication\checkHeadersSent(), AbstractWebApplication\getHttpStatusValue(), et AbstractWebApplication\header().
Référencé par AbstractWebApplication\respond().
setBody | ( | $content | ) |
Set body content. If body content already defined, this will replace it.
string | $content | The content to set as the response body. |
Références $content.
Référencé par AbstractWebApplication\compress().
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. |
Références $key, $name, et $value.
Référencé par AbstractWebApplication\compress(), AbstractWebApplication\redirect(), et AbstractWebApplication\respond().
setSession | ( | Session | $session | ) |
Sets the session for the application to use, if required.
Session | $session | A session object. |
Références AbstractWebApplication\$session.
$charSet = 'utf-8' |
$client |
Référencé par AbstractWebApplication\__construct().
$httpVersion = '1.1' |
$mimeType = 'text/html' |
$modifiedDate |
|
protected |
|
private |
|
private |
Référencé par AbstractWebApplication\getSession(), et AbstractWebApplication\setSession().