added clear() method to the input class
Signed-off-by: Dayle Rees <thepunkfan@gmail.com>
This commit is contained in:
parent
34919aff71
commit
e3317324b0
|
@ -145,4 +145,10 @@ #### Merging new data into the current input:
|
|||
|
||||
#### Replacing the entire input array with new data:
|
||||
|
||||
Input::merge(array('doctor' => 'Bones', 'captain' => 'Kirk'));
|
||||
Input::merge(array('doctor' => 'Bones', 'captain' => 'Kirk'));
|
||||
|
||||
## Clearing Input
|
||||
|
||||
To clear all input data for the current request, using the `clear()` method, for example:
|
||||
|
||||
Input::clear();
|
|
@ -287,4 +287,13 @@ public static function replace(array $input)
|
|||
Request::foundation()->request->replace($input);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the input for the current request.
|
||||
* @return void
|
||||
*/
|
||||
public static function clear()
|
||||
{
|
||||
Request::foundation()->request->replace(array());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue