Documentation

HttpFactory
in package
implements RequestFactoryInterface, ResponseFactoryInterface, ServerRequestFactoryInterface, StreamFactoryInterface, UploadedFileFactoryInterface, UriFactoryInterface

FinalYes

Implements all of the PSR-17 interfaces.

Note: in consuming code it is recommended to require the implemented interfaces and inject the instance of this class multiple times.

Table of Contents

Interfaces

RequestFactoryInterface
ResponseFactoryInterface
ServerRequestFactoryInterface
StreamFactoryInterface
UploadedFileFactoryInterface
UriFactoryInterface

Methods

createRequest()  : RequestInterface
createResponse()  : ResponseInterface
createServerRequest()  : ServerRequestInterface
createStream()  : StreamInterface
createStreamFromFile()  : StreamInterface
createStreamFromResource()  : StreamInterface
createUploadedFile()  : UploadedFileInterface
createUri()  : UriInterface

Methods

createServerRequest()

public createServerRequest(string $method, mixed $uri[, array<string|int, mixed> $serverParams = [] ]) : ServerRequestInterface
Parameters
$method : string
$uri : mixed
$serverParams : array<string|int, mixed> = []
Return values
ServerRequestInterface

createUploadedFile()

public createUploadedFile(StreamInterface $stream[, int|null $size = null ][, int $error = UPLOAD_ERR_OK ][, string|null $clientFilename = null ][, string|null $clientMediaType = null ]) : UploadedFileInterface
Parameters
$stream : StreamInterface
$size : int|null = null
$error : int = UPLOAD_ERR_OK
$clientFilename : string|null = null
$clientMediaType : string|null = null
Return values
UploadedFileInterface

        
On this page

Search results