Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct ($text, int $status=200, array $headers=[]) | |
Fonctions membres publiques hérités de Response | |
__construct ($body='php://memory', int $status=200, array $headers=[]) | |
getStatusCode () | |
getReasonPhrase () | |
withStatus ($code, $reasonPhrase='') | |
Fonctions membres publiques hérités de MessageInterface | |
getProtocolVersion () | |
withProtocolVersion ($version) | |
getHeaders () | |
hasHeader ($name) | |
getHeader ($name) | |
getHeaderLine ($name) | |
withHeader ($name, $value) | |
withAddedHeader ($name, $value) | |
withoutHeader ($name) | |
getBody () | |
withBody (StreamInterface $body) | |
Fonctions membres privées | |
createBody ($text) | |
Membres hérités additionnels | |
Champs de données hérités de Response | |
const | MIN_STATUS_CODE_VALUE = 100 |
const | MAX_STATUS_CODE_VALUE = 599 |
Plain text response.
Allows creating a response by passing a string to the constructor; by default, sets a status code of 200 and sets the Content-Type header to text/plain.
__construct | ( | $text, | |
int | $status = 200 , |
||
array | $headers = [] |
||
) |
Create a plain text response.
Produces a text response with a Content-Type of text/plain and a default status of 200.
string | StreamInterface | $text | String or stream for the message body. |
int | $status | Integer status code for the response; 200 by default. |
array | $headers | Array of headers to use at initialization. |
Exception |
Références $text, Symfony\Contracts\Service\__construct(), et TextResponse\createBody().
|
private |
Create the message body.
string | StreamInterface | $text |
Exception |
Références $text.
Référencé par TextResponse\__construct().