Fr3nch13/CakePHP Utilities

ServerRequestFactoryInterface

Table of Contents

Methods

createServerRequest()  : ServerRequestInterface
Create a new server request.

Methods

createServerRequest()

Create a new server request.

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

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.

Parameters
$method : string

The HTTP method associated with the request.

$uri : UriInterface|string

The URI associated with the request. If the value is a string, the factory MUST create a UriInterface instance based on it.

$serverParams : array<string|int, mixed> = []

Array of SAPI parameters with which to seed the generated request instance.

Return values
ServerRequestInterface

        
On this page

Search results