Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
createRequest (string $method, $uri) | |
createResponse (int $code=200, string $reasonPhrase='') | |
createStream (string $content='') | |
createStreamFromFile (string $filename, string $mode='r') | |
createStreamFromResource ($resource) | |
createUploadedFile (StreamInterface $stream, int $size=null, int $error=\UPLOAD_ERR_OK, string $clientFilename=null, string $clientMediaType=null) | |
createUri (string $uri='') | |
createServerRequest (string $method, $uri, array $serverParams=[]) | |
This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md
createRequest | ( | string | $method, |
$uri | |||
) |
Create a new request.
string | $method | The HTTP method associated with the request. |
UriInterface | string | $uri | The URI associated with the request. If the value is a string, the factory MUST create a UriInterface instance based on it. |
Implémente RequestFactoryInterface.
Références $method, et Nyholm\Psr7\$uri.
createResponse | ( | int | $code = 200 , |
string | $reasonPhrase = '' |
||
) |
Create a new response.
int | $code | HTTP status code; defaults to 200 |
string | $reasonPhrase | Reason phrase to associate with status code in generated response; if none is provided implementations MAY use the defaults as suggested in the HTTP specification. |
Implémente ResponseFactoryInterface.
Références null.
createServerRequest | ( | string | $method, |
$uri, | |||
array | $serverParams = [] |
||
) |
Create a new server request.
Note that server-params are taken precisely as given - no parsing/processing of the given values is performed, and, in particular, no attempt is made to determine the HTTP method or URI, which must be provided explicitly.
string | $method | The HTTP method associated with the request. |
UriInterface | string | $uri | The URI associated with the request. If the value is a string, the factory MUST create a UriInterface instance based on it. |
array | $serverParams | Array of SAPI parameters with which to seed the generated request instance. |
Implémente ServerRequestFactoryInterface.
Références $method, Nyholm\Psr7\$uri, et null.
createStream | ( | string | $content = '' | ) |
Create a new stream from a string.
The stream SHOULD be created with a temporary resource.
string | $content | String content with which to populate the stream. |
Implémente StreamFactoryInterface.
Références $content, et Stream\create().
createStreamFromFile | ( | string | $filename, |
string | $mode = 'r' |
||
) |
Create a stream from an existing file.
The file MUST be opened using the given mode, which may be any mode supported by the fopen
function.
The $filename
MAY be any string supported by fopen()
.
string | $filename | Filename or stream URI to use as basis of stream. |
string | $mode | Mode with which to open the underlying filename/stream. |
Implémente StreamFactoryInterface.
Références $mode, et Stream\create().
createStreamFromResource | ( | $resource | ) |
Create a new stream from an existing resource.
The stream MUST be readable and may be writable.
resource | $resource | PHP resource to use as basis of stream. |
Implémente StreamFactoryInterface.
Références Stream\create().
createUploadedFile | ( | StreamInterface | $stream, |
int | $size = null , |
||
int | $error = \UPLOAD_ERR_OK , |
||
string | $clientFilename = null , |
||
string | $clientMediaType = null |
||
) |
Create a new uploaded file.
If a size is not provided it will be determined by checking the size of the file.
StreamInterface | $stream | Underlying stream representing the uploaded file content. |
int | $size | in bytes |
int | $error | PHP file upload error |
string | $clientFilename | Filename as provided by the client, if any. |
string | $clientMediaType | Media type as provided by the client, if any. |
Implémente UploadedFileFactoryInterface.
Références $size, Nyholm\Psr7\$stream, et null.
createUri | ( | string | $uri = '' | ) |
Create a new URI.
string | $uri |
Implémente UriFactoryInterface.
Références Nyholm\Psr7\$uri.