Request handling - dknx01/micromvc GitHub Wiki

Request handling

For the handling of requests (get and post) is an own class.

$request = \Mvc\Helper\Request();

When it is initialised it will parse all request paramters, extract the controller and action name and store all other parameters in an internal storage.

// the controller name
$request->getControllerName();
// the action name
$request->getAction()
// access parameter 'tes'
$request->getParamByName('test');
// or
$request->getParam('test)

The request is also stored under \Mvc\Registry::getInstance()->get('request');

⚠️ **GitHub.com Fallback** ⚠️