class RequestFactory

HTTP request factory.

Constants

private internal ValidChars

Properties

array<string,array<string,string>> $urlFilters

Regex-based filters applied to the URL before parsing. 'path' filters run on the path component only; 'url' filters run on the full request URI.

Methods

setBinary(bool $binary = true)

Disables sanitization of request data (GET, POST, cookies, file names) for binary-safe handling.

setProxy(string|array $proxy)

Sets the trusted proxy IP addresses or CIDR blocks used to resolve the real client IP and URL scheme.

setForceHttps(bool $forceHttps = true)

Forces the request scheme to HTTPS regardless of the server environment.

fromGlobals()

Returns new Request instance, using values from superglobals.

createHttpRequest()

No description

Details

at line 45
RequestFactory setBinary(bool $binary = true)

Disables sanitization of request data (GET, POST, cookies, file names) for binary-safe handling.

Parameters

bool $binary

Return Value

RequestFactory

at line 56
RequestFactory setProxy(string|array $proxy)

Sets the trusted proxy IP addresses or CIDR blocks used to resolve the real client IP and URL scheme.

Parameters

string|array $proxy

Return Value

RequestFactory

at line 66
RequestFactory setForceHttps(bool $forceHttps = true)

Forces the request scheme to HTTPS regardless of the server environment.

Parameters

bool $forceHttps

Return Value

RequestFactory

at line 76
Request fromGlobals()

Returns new Request instance, using values from superglobals.

Return Value

Request

at line 399
Request createHttpRequest()

No description

Return Value

Request