class Request

Presenter request.

Traits

Strict class for better experience.

Constants

FORWARD

method

SECURED

flag

RESTORED

flag

VARYING

flag

Properties

string $presenterName
array $parameters
array $post
array $files
string|null $method

Methods

__construct(string $name, string $method = null, array $params = [], array $post = [], array $files = [], array $flags = [])

No description

setPresenterName(string $name)

Sets the presenter name.

string
getPresenterName()

Retrieve the presenter name.

setParameters(array $params)

Sets variables provided to the presenter.

array
getParameters()

Returns all variables provided to the presenter (usually via URL).

mixed
getParameter(string $key)

Returns a parameter provided to the presenter.

setPost(array $params)

Sets variables provided to the presenter via POST.

mixed
getPost(string $key = null)

Returns a variable provided to the presenter via POST.

setFiles(array $files)

Sets all uploaded files.

array
getFiles()

Returns all uploaded files.

setMethod(string|null $method)

Sets the method.

string|null
getMethod()

Returns the method.

bool
isMethod(string $method)

Checks if the method is the given one.

setFlag(string $flag, bool $value = true)

Sets the flag.

bool
hasFlag(string $flag)

Checks the flag.

array
toArray()

No description

Details

at line 62
__construct(string $name, string $method = null, array $params = [], array $post = [], array $files = [], array $flags = [])

Parameters

string $name
string $method
array $params
array $post
array $files
array $flags

at line 77
Request setPresenterName(string $name)

Sets the presenter name.

Parameters

string $name

Return Value

Request

at line 87
string getPresenterName()

Retrieve the presenter name.

Return Value

string

at line 97
Request setParameters(array $params)

Sets variables provided to the presenter.

Parameters

array $params

Return Value

Request

at line 107
array getParameters()

Returns all variables provided to the presenter (usually via URL).

Return Value

array

at line 117
mixed getParameter(string $key)

Returns a parameter provided to the presenter.

Parameters

string $key

Return Value

mixed

at line 127
Request setPost(array $params)

Sets variables provided to the presenter via POST.

Parameters

array $params

Return Value

Request

at line 139
mixed getPost(string $key = null)

Returns a variable provided to the presenter via POST.

If no key is passed, returns the entire array.

Parameters

string $key

Return Value

mixed

at line 151
Request setFiles(array $files)

Sets all uploaded files.

Parameters

array $files

Return Value

Request

at line 161
array getFiles()

Returns all uploaded files.

Return Value

array

at line 171
Request setMethod(string|null $method)

Sets the method.

Parameters

string|null $method

Return Value

Request

at line 181
string|null getMethod()

Returns the method.

Return Value

string|null

at line 190
bool isMethod(string $method)

Checks if the method is the given one.

Parameters

string $method

Return Value

bool

at line 200
Request setFlag(string $flag, bool $value = true)

Sets the flag.

Parameters

string $flag
bool $value

Return Value

Request

at line 210
bool hasFlag(string $flag)

Checks the flag.

Parameters

string $flag

Return Value

bool

at line 216
array toArray()

Return Value

array