Add SimplePresenter::requestParam

Behaves like queryParam, but uses _REQUEST variable instead.
This commit is contained in:
Jill Stingray 2020-07-29 11:02:50 +00:00
parent 55515de8b6
commit 9606b74aed

View file

@ -174,6 +174,11 @@ abstract class SimplePresenter implements IPresenter
return $_POST[$index] ?? NULL;
}
protected function requestParam(string $index): ?string
{
return $_REQUEST[$index];
}
protected function checkbox(string $name): bool
{
return ($this->postParam($name) ?? "off") === "on";