Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct (Input $input=null, Registry $config=null, Web\WebClient $client=null, ResponseInterface $response=null) | |
__get ($name) | |
execute () | |
getInput () | |
redirect ($url, $status=303) | |
allowCache ($allow=null) | |
setHeader ($name, $value, $replace=false) | |
getHeaders () | |
clearHeaders () | |
sendHeaders () | |
setBody ($content) | |
prependBody ($content) | |
appendBody ($content) | |
getBody () | |
getResponse () | |
isValidHttpStatus ($code) | |
setResponse (ResponseInterface $response) | |
isSslConnection () | |
Fonctions membres publiques hérités de AbstractApplication | |
__construct (Registry $config=null) | |
close ($code=0) | |
execute () | |
get ($key, $default=null) | |
getLogger () | |
set ($key, $value=null) | |
setConfiguration (Registry $config) | |
Fonctions membres publiques hérités de LoggerAwareInterface | |
setLogger (LoggerInterface $logger) | |
Fonctions membres publiques hérités de DispatcherAwareInterface | |
setDispatcher (DispatcherInterface $dispatcher) | |
Fonctions membres publiques statiques | |
static | isAscii ($str) |
Champs de données | |
$charSet = 'utf-8' | |
$mimeType = 'text/html' | |
$httpVersion = '1.1' | |
$modifiedDate | |
$client | |
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 | |
dispatchEvent (string $eventName, ?EventInterface $event=null) | |
doExecute () | |
initialise () | |
Attributs protégés | |
$input | |
$response | |
Attributs protégés hérités de AbstractApplication | |
$config | |
Attributs privés | |
$cacheable = false | |
$responseMap | |
__construct | ( | Input | $input = null , |
Registry | $config = null , |
||
Web\WebClient | $client = null , |
||
ResponseInterface | $response = null |
||
) |
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. |
ResponseInterface | $response | An optional argument to provide dependency injection for the application's response object. If the argument is a ResponseInterface object that object will become the application's response object, otherwise a default response object is created. |
Références AbstractWebApplication\$client, AbstractApplication\$config, AbstractWebApplication\$input, AbstractWebApplication\$response, Symfony\Contracts\Service\__construct(), AbstractWebApplication\loadSystemUris(), et AbstractWebApplication\setResponse().
__get | ( | $name | ) |
Magic method to access properties of the application.
string | $name | The name of the property. |
Références $name, class, et AbstractWebApplication\getInput().
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. |
Implémente WebApplicationInterface.
Références AbstractWebApplication\$cacheable, et 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. |
Implémente WebApplicationInterface.
Références $content, Laminas\Diactoros\$stream, $this, elseif, AbstractWebApplication\getResponse(), AbstractWebApplication\setResponse(), et Laminas\Diactoros\withBody().
|
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.
Référencé par AbstractWebApplication\compress(), AbstractWebApplication\redirect(), et AbstractWebApplication\sendHeaders().
clearHeaders | ( | ) |
Method to clear any set response headers.
Implémente WebApplicationInterface.
Références $name, AbstractWebApplication\$response, $this, AbstractWebApplication\getResponse(), et AbstractWebApplication\setResponse().
|
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.
Implémente ApplicationInterface.
Références $this, ApplicationEvents\AFTER_EXECUTE, ApplicationEvents\AFTER_RESPOND, ApplicationEvents\BEFORE_EXECUTE, ApplicationEvents\BEFORE_RESPOND, AbstractWebApplication\compress(), AbstractApplication\dispatchEvent(), AbstractApplication\doExecute(), ApplicationEvents\ERROR, et AbstractWebApplication\respond().
getBody | ( | ) |
Return the body content
Implémente WebApplicationInterface.
Références AbstractWebApplication\getResponse().
Référencé par AbstractWebApplication\compress(), et AbstractWebApplication\respond().
getHeaders | ( | ) |
Method to get the array of response headers to be sent when the response is sent to the client.
Implémente WebApplicationInterface.
Références $name, $return, $value, et AbstractWebApplication\getResponse().
Référencé par AbstractWebApplication\sendHeaders().
|
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().
getInput | ( | ) |
Method to get the application input object.
Implémente WebApplicationInterface.
Références AbstractWebApplication\$input.
Référencé par AbstractWebApplication\__get().
getResponse | ( | ) |
Get the PSR-7 Response Object.
Implémente WebApplicationInterface.
Références AbstractWebApplication\$response.
Référencé par AbstractWebApplication\appendBody(), AbstractWebApplication\clearHeaders(), AbstractWebApplication\getBody(), AbstractWebApplication\getHeaders(), AbstractWebApplication\prependBody(), AbstractWebApplication\respond(), AbstractWebApplication\setBody(), et AbstractWebApplication\setHeader().
Method to send a header to the client.
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érences null.
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.
Implémente WebApplicationInterface.
Référencé par AbstractWebApplication\detectRequestUri().
isValidHttpStatus | ( | $code | ) |
Check if the value is a valid HTTP status code
integer | $code | The potential status code |
Implémente WebApplicationInterface.
|
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. |
Implémente WebApplicationInterface.
Références $content, Laminas\Diactoros\$stream, $this, AbstractWebApplication\getResponse(), AbstractWebApplication\setResponse(), et Laminas\Diactoros\withBody().
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 | boolean | $status | The HTTP status code to be provided. 303 is assumed by default. |
Implémente WebApplicationInterface.
Références $html, $parts, $path, $prefix, $uri, $url, ApplicationEvents\AFTER_RESPOND, ApplicationEvents\BEFORE_RESPOND, AbstractWebApplication\checkHeadersSent(), AbstractApplication\close(), AbstractApplication\dispatchEvent(), elseif, AbstractWebApplication\isRedirectState(), AbstractWebApplication\respond(), et AbstractWebApplication\setHeader().
|
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\getResponse(), Symfony\Component\Console\Tester\getStatusCode(), Laminas\Diactoros\hasHeader(), AbstractWebApplication\sendHeaders(), et AbstractWebApplication\setHeader().
Référencé par AbstractWebApplication\execute(), et AbstractWebApplication\redirect().
sendHeaders | ( | ) |
Send the response headers.
Implémente WebApplicationInterface.
Références $header, $this, AbstractWebApplication\checkHeadersSent(), AbstractWebApplication\getHeaders(), 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. |
Implémente WebApplicationInterface.
Références $content, Laminas\Diactoros\$stream, $this, AbstractWebApplication\getResponse(), AbstractWebApplication\setResponse(), et Laminas\Diactoros\withBody().
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. |
Implémente WebApplicationInterface.
Références $name, AbstractWebApplication\$response, $this, $value, AbstractWebApplication\getResponse(), et AbstractWebApplication\setResponse().
Référencé par AbstractWebApplication\compress(), AbstractWebApplication\redirect(), et AbstractWebApplication\respond().
setResponse | ( | ResponseInterface | $response | ) |
Set the PSR-7 Response Object.
ResponseInterface | $response | The response object |
Implémente WebApplicationInterface.
Références AbstractWebApplication\$response.
Référencé par AbstractWebApplication\__construct(), AbstractWebApplication\appendBody(), AbstractWebApplication\clearHeaders(), AbstractWebApplication\prependBody(), AbstractWebApplication\setBody(), et AbstractWebApplication\setHeader().
|
private |
Référencé par AbstractWebApplication\allowCache().
$charSet = 'utf-8' |
$client |
Référencé par WebApplication\__construct(), et AbstractWebApplication\__construct().
$httpVersion = '1.1' |
|
protected |
$mimeType = 'text/html' |
$modifiedDate |
|
protected |
|
private |