Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe Psr17Factory
+ Graphe d'héritage de Psr17Factory:

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=[])
 

Description détaillée

Documentation des fonctions membres

◆ createRequest()

createRequest ( string  $method,
  $uri 
)

Create a new request.

Paramètres
string$methodThe HTTP method associated with the request.
UriInterface | string$uriThe URI associated with the request. If the value is a string, the factory MUST create a UriInterface instance based on it.
Renvoie
RequestInterface

Implémente RequestFactoryInterface.

Références $method, et Nyholm\Psr7\$uri.

◆ createResponse()

createResponse ( int  $code = 200,
string  $reasonPhrase = '' 
)

Create a new response.

Paramètres
int$codeHTTP status code; defaults to 200
string$reasonPhraseReason phrase to associate with status code in generated response; if none is provided implementations MAY use the defaults as suggested in the HTTP specification.
Renvoie
ResponseInterface

Implémente ResponseFactoryInterface.

Références null.

◆ createServerRequest()

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.

Paramètres
string$methodThe HTTP method associated with the request.
UriInterface | string$uriThe URI associated with the request. If the value is a string, the factory MUST create a UriInterface instance based on it.
array$serverParamsArray of SAPI parameters with which to seed the generated request instance.
Renvoie
ServerRequestInterface

Implémente ServerRequestFactoryInterface.

Références $method, Nyholm\Psr7\$uri, et null.

◆ createStream()

createStream ( string  $content = '')

Create a new stream from a string.

The stream SHOULD be created with a temporary resource.

Paramètres
string$contentString content with which to populate the stream.
Renvoie
StreamInterface

Implémente StreamFactoryInterface.

Références $content, et Stream\create().

◆ createStreamFromFile()

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().

Paramètres
string$filenameFilename or stream URI to use as basis of stream.
string$modeMode with which to open the underlying filename/stream.
Renvoie
StreamInterface
Exceptions

Implémente StreamFactoryInterface.

Références $mode, et Stream\create().

◆ createStreamFromResource()

createStreamFromResource (   $resource)

Create a new stream from an existing resource.

The stream MUST be readable and may be writable.

Paramètres
resource$resourcePHP resource to use as basis of stream.
Renvoie
StreamInterface

Implémente StreamFactoryInterface.

Références Stream\create().

◆ createUploadedFile()

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.

Voir également
http://php.net/manual/features.file-upload.post-method.php
http://php.net/manual/features.file-upload.errors.php
Paramètres
StreamInterface$streamUnderlying stream representing the uploaded file content.
int$sizein bytes
int$errorPHP file upload error
string$clientFilenameFilename as provided by the client, if any.
string$clientMediaTypeMedia type as provided by the client, if any.
Renvoie
UploadedFileInterface
Exceptions

Implémente UploadedFileFactoryInterface.

Références $size, Nyholm\Psr7\$stream, et null.

◆ createUri()

createUri ( string  $uri = '')

Create a new URI.

Paramètres
string$uri
Renvoie
UriInterface
Exceptions

Implémente UriFactoryInterface.

Références Nyholm\Psr7\$uri.


La documentation de cette classe a été générée à partir du fichier suivant :