19 declare(strict_types=1);
46 return $this->
http->request();
49 public function isset(
string $key): bool
51 return $this->
raw($key) !==
null;
56 return $this->
raw(
'ref_id') !==
null;
61 return $this->
int(
"ref_id");
72 return $this->
raw(
'q_id') !==
null;
77 return $this->
int(
'q_id');
87 return $this->
str(
'nextCommand');
92 return $this->
int(
'active_id');
97 return $this->
int(
'pass_id');
102 if (!$this->
http->wrapper()->post()->has($key)) {
106 return $this->
http->wrapper()->post()->retrieve(
109 $this->refinery->kindlyTo()->bool(),
117 if (!$this->
http->wrapper()->query()->has(
'instresp')) {
121 return $this->
http->wrapper()->query()->retrieve(
124 $this->refinery->kindlyTo()->bool(),
133 public function raw(
string $key): mixed
135 return $this->
get($key, $this->
refinery->identity());
138 public function strVal(
string $key): string
140 return $this->
str($key);
145 return $this->
http->request()->getParsedBody();
153 return $this->
http->wrapper()->post()->keys();
158 return $this->
http->request()->getMethod() ===
'POST';
179 return $this->
http->wrapper()->post()->retrieve(
182 $this->refinery->kindlyTo()->listOf($transformation),
193 $p = $this->
http->wrapper()->query();
196 if (!$p->has($key)) {
202 $r->custom()->transformation(
function ($value) {
203 return $value ===
'ALL_OBJECTS' || $value[0] ===
'ALL_OBJECTS' ?
'ALL_OBJECTS' :
array_map(
'intval', $value);
__construct(HTTPServices $http, Refinery $refinery)
retrieveArrayOfStringsFromPost(string $key)
isInstanceResponseRequested()
trait BaseGUIRequest
Base gui request wrapper.
retrieveArrayOfIntsFromPost(string $key)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
initRequest(HTTP\Services $http, Refinery\Factory $refinery, ?array $passed_query_params=null, ?array $passed_post_data=null)
Query params and post data parameters are used for testing.
static http()
Fetches the global http state from ILIAS.
getMultiSelectionIds(string $key)
retrieveArrayFromPost(string $key, Transformation $transformation)
retrieveBoolFromPost(string $key)