Slim 3 - how to get all get/ put/ post variables?

To Get all request params:

$request->getParams() 

Get all get/put/post parameters:

//GET
$allGetVars = $request->getQueryParams();
foreach($allGetVars as $key => $param){
   //GET parameters list
}

//POST or PUT
$allPostPutVars = $request->getParsedBody();
foreach($allPostPutVars as $key => $param){
   //POST or PUT parameters list
}

Single parameters value:

//Single GET parameter
$getParam = $allGetVars['title'];

//Single POST/PUT parameter
$postParam = $allPostPutVars['postParam'];

Tags:

Slim

Psr 7

Slim 3