29 protected \ILIAS\HTTP\Services
$http;
30 protected \ILIAS\FileUpload\FileUpload
$upload;
35 \
ILIAS\FileUpload\FileUpload $upload
50 if ($this->
upload->hasUploads()) {
51 if (!$this->
upload->hasBeenProcessed()) {
54 $uploads = $this->
upload->getResults();
65 public function getUploadFilename(array $http_names,
int $index): ?
string 67 $uploaded_files = $this->
http->request()->getUploadedFiles();
69 while (($current_key = array_shift($http_names)) !== null) {
70 if (!
isset($uploaded_files[$current_key])) {
74 $uploaded_files = $uploaded_files[$current_key];
76 if (
isset($uploaded_files[$index]) && $http_names === []) {
78 $file = $uploaded_files[$index];
79 $c = \Closure::bind(
static function (\GuzzleHttp\Psr7\UploadedFile $file): ?
string {
80 return $file->file ?? null;
97 return $this->
raw($key) !== null;
101 return $this->
raw(
'ref_id') !== null;
106 return $this->
int(
"ref_id");
111 return $this->
raw(
'q_id') !== null;
116 return $this->
int(
'q_id');
130 $no_transform = $this->
refinery->identity();
131 return $this->
get(
$key, $no_transform);
136 $t = $this->
refinery->kindlyTo()->float();
138 return $this->
get(
$key, $t) ?? 0.0;
146 $t = $this->
refinery->kindlyTo()->string();
147 return $this->
get(
$key, $t) ??
'';
152 return $this->
http->request()->getParsedBody();
168 return $this->
intArray(
"category_ids");
Class ChatMainBarProvider .
ILIAS HTTP Services $http
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.
__construct(\ILIAS\HTTP\Services $http, \ILIAS\Refinery\Factory $refinery, \ILIAS\FileUpload\FileUpload $upload)
trait BaseGUIRequest
Base gui request wrapper.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS FileUpload FileUpload $upload
Refinery Factory $refinery