HTTPRequestBuilder
class HTTPRequestBuilder (View source)
Methods
public static
createFromEnvironment()
Create HTTPRequest instance from the current environment variables.
public static
createFromVariables(array $variables, string $input, string|null $url = null)
Build HTTPRequest from given variables
public static
array
extractRequestHeaders(array $server)
Takes a $_SERVER data array and extracts HTTP request headers.
public static
array
cleanEnvironment(array $variables)
Clean up HTTP global vars for $_GET / $_REQUEST prior to bootstrapping
Details
static HTTPRequest
createFromEnvironment()
Create HTTPRequest instance from the current environment variables.
May throw errors if request is invalid.
static HTTPRequest
createFromVariables(array $variables, string $input, string|null $url = null)
Build HTTPRequest from given variables
static array
extractRequestHeaders(array $server)
Takes a $_SERVER data array and extracts HTTP request headers.
static array
cleanEnvironment(array $variables)
Clean up HTTP global vars for $_GET / $_REQUEST prior to bootstrapping