You may access all user input with a few simple methods. You do not need to worry about the HTTP verb when dealing with GET
and POST
.
Note: Remember to include
Herbert\Framework\Http $http
.
$name = $http->get('name');
$name = $http->get('name', 'Sally');
if ( $http->has('name') )
{
//
}
$input = $http->all();
$http->set('name', 'Bob');
$http->forget('name');