class OldInput (View source)

Provide a way to get values from the previous request.

Methods

__construct(Flash $flash, string $flash_key = '__wpemergeOldInput')

Constructor.

boolean
enabled()

Get whether the old input service is enabled.

mixed
get(string $key, mixed $default = null)

Get request value for key from the previous request.

set(array $input)

Set input for the next request.

void
clear()

Clear input for the next request.

Details

__construct(Flash $flash, string $flash_key = '__wpemergeOldInput')

Constructor.

Parameters

Flash $flash
string $flash_key

boolean enabled()

Get whether the old input service is enabled.

Return Value

boolean

mixed get(string $key, mixed $default = null)

Get request value for key from the previous request.

Parameters

string $key
mixed $default

Return Value

mixed

set(array $input)

Set input for the next request.

Parameters

array $input

void clear()

Clear input for the next request.

Return Value

void