How To

Learn how to retrieve request parameter values in BitFrame Microframework

Get Request Params

GET:

You can get $_GET params by using the getQueryParams() method like so:

$params = $request->getQueryParams();

foreach($params as $key => $param){
    // GET parameters...
}

POST / PUT:

You can get $_POST or $_PUT params by using the getParsedBody() method like so:

$params = $request->getParsedBody();

foreach($params as $key => $param){
   // POST or PUT parameters...
}

Comments

Let us know if you have something to say or add