HTTP Requests
Will auto protect agains XXS!
Access request class
$this->modal()->request();
Usage
$this->modal()->request()->[REQUEST_TYPE]->[SETTINGS]->[SETTINGS]->val();
Request types
$this->modal()->request()->get(string/array); $this->modal()->request()->post(string/array); $this->modal()->request()->array(array) // Specify custom data;
Settings
Se all chaining methods in settings list »
Examples
Allways start with one of (get, post or array). They work exactly the same so I will only show examples with get bellow.
Get all HTTP requests
Will return all HTTP requests from URL as array
$this->modal()->request()->get()->val();
Query string: id=1&permalink=test&type=page&lorem=ok
Result: [id => 1, permalink => test, type => page, lorem => ok]
Whitelist: Get one HTTP request
Will return one HTTP request from URL as string
$this->modal()->request()->get("id")->val();
Query string: id=1&permalink=test&type=page&lorem=ok
Result: 1
Whitelist: Get multiple specified HTTP request
Will return multiple and specified HTTP request from URL as array
$this->modal()->request()->get(["id", "permalink", "type"])->val();
Query string: id=1&permalink=test&type=page&lorem=ok
Result: [id => 1, permalink => test, type => page]
Format return values
Will format values. Click here to get all settings »
$this->modal()->request()->get("permalink")->friendly()->xxs(false)->val();
Query string: permalink=Hello world
Result: hello-world