ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\TestQuestionPool\InternalRequestService Class Reference
+ Collaboration diagram for ILIAS\TestQuestionPool\InternalRequestService:

Public Member Functions

 __construct (\ILIAS\HTTP\Services $http, \ILIAS\Refinery\Factory $refinery, \ILIAS\FileUpload\FileUpload $upload)
 
 getProcessedUploads ()
 
 upload ()
 
 isset (string $key)
 
 hasRefId ()
 
 getRefId ()
 
 hasQuestionId ()
 
 getQuestionId ()
 
 getIds ()
 
 raw (string $key)
 
 getParsedBody ()
 
 getUnitIds ()
 
 getUnitCategoryIds ()
 

Protected Attributes

ILIAS HTTP Services $http
 
ILIAS FileUpload FileUpload $upload
 

Detailed Description

Definition at line 23 of file class.InternalRequestService.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\TestQuestionPool\InternalRequestService::__construct ( \ILIAS\HTTP\Services  $http,
\ILIAS\Refinery\Factory  $refinery,
\ILIAS\FileUpload\FileUpload  $upload 
)

Definition at line 30 of file class.InternalRequestService.php.

References ILIAS\TestQuestionPool\InternalRequestService\$upload, ILIAS\Repository\initRequest(), and ILIAS\TestQuestionPool\InternalRequestService\upload().

34  {
35  $this->initRequest(
36  $http,
37  $refinery
38  );
39  $this->upload = $upload;
40  }
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.
Refinery Factory $refinery
+ Here is the call graph for this function:

Member Function Documentation

◆ getIds()

ILIAS\TestQuestionPool\InternalRequestService::getIds ( )
Returns
string[]

Definition at line 118 of file class.InternalRequestService.php.

References ILIAS\Repository\strArray().

118  : array
119  {
120  return $this->strArray("id");
121  }
+ Here is the call graph for this function:

◆ getParsedBody()

ILIAS\TestQuestionPool\InternalRequestService::getParsedBody ( )

Definition at line 132 of file class.InternalRequestService.php.

References ILIAS\FileDelivery\http().

133  {
134  return $this->http->request()->getParsedBody();
135  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

◆ getProcessedUploads()

ILIAS\TestQuestionPool\InternalRequestService::getProcessedUploads ( )
Returns
[]

Definition at line 45 of file class.InternalRequestService.php.

References $c, $index, ILIAS\FileDelivery\http(), ILIAS\TestQuestionPool\InternalRequestService\isset(), and ILIAS\TestQuestionPool\InternalRequestService\upload().

45  : array
46  {
47  $uploads = [];
48  if ($this->upload->hasUploads()) {
49  if (!$this->upload->hasBeenProcessed()) {
50  $this->upload->process();
51  }
52  $uploads = $this->upload->getResults();
53  }
54 
55  return $uploads;
56  }
+ Here is the call graph for this function:

◆ getQuestionId()

ILIAS\TestQuestionPool\InternalRequestService::getQuestionId ( )

Definition at line 112 of file class.InternalRequestService.php.

References ILIAS\Repository\int().

112  : int
113  {
114  return $this->int('q_id');
115  }
+ Here is the call graph for this function:

◆ getRefId()

ILIAS\TestQuestionPool\InternalRequestService::getRefId ( )

Definition at line 102 of file class.InternalRequestService.php.

References ILIAS\Repository\int().

102  : int
103  {
104  return $this->int("ref_id");
105  }
+ Here is the call graph for this function:

◆ getUnitCategoryIds()

ILIAS\TestQuestionPool\InternalRequestService::getUnitCategoryIds ( )
Returns
int[]

Definition at line 148 of file class.InternalRequestService.php.

References ILIAS\Repository\intArray().

148  : array
149  {
150  return $this->intArray("category_ids");
151  }
+ Here is the call graph for this function:

◆ getUnitIds()

ILIAS\TestQuestionPool\InternalRequestService::getUnitIds ( )
Returns
int[]

Definition at line 140 of file class.InternalRequestService.php.

References ILIAS\Repository\intArray().

140  : array
141  {
142  return $this->intArray("unit_ids");
143  }
+ Here is the call graph for this function:

◆ hasQuestionId()

ILIAS\TestQuestionPool\InternalRequestService::hasQuestionId ( )

Definition at line 107 of file class.InternalRequestService.php.

References ILIAS\TestQuestionPool\InternalRequestService\raw().

107  : bool
108  {
109  return $this->raw('q_id') !== null;
110  }
+ Here is the call graph for this function:

◆ hasRefId()

ILIAS\TestQuestionPool\InternalRequestService::hasRefId ( )

Definition at line 97 of file class.InternalRequestService.php.

References ILIAS\TestQuestionPool\InternalRequestService\raw().

97  : int
98  {
99  return $this->raw('ref_id') !== null;
100  }
+ Here is the call graph for this function:

◆ isset()

ILIAS\TestQuestionPool\InternalRequestService::isset ( string  $key)

Definition at line 93 of file class.InternalRequestService.php.

References ILIAS\TestQuestionPool\InternalRequestService\raw().

Referenced by ILIAS\TestQuestionPool\InternalRequestService\getProcessedUploads().

93  : bool
94  {
95  return $this->raw($key) !== null;
96  }
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ raw()

ILIAS\TestQuestionPool\InternalRequestService::raw ( string  $key)
Returns
mixed|null

Definition at line 126 of file class.InternalRequestService.php.

References ILIAS\LTI\ToolProvider\$key, and ILIAS\Repository\refinery().

Referenced by ILIAS\TestQuestionPool\InternalRequestService\hasQuestionId(), ILIAS\TestQuestionPool\InternalRequestService\hasRefId(), and ILIAS\TestQuestionPool\InternalRequestService\isset().

127  {
128  $no_transform = $this->refinery->identity();
129  return $this->get($key, $no_transform);
130  }
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upload()

ILIAS\TestQuestionPool\InternalRequestService::upload ( )

Field Documentation

◆ $http

ILIAS HTTP Services ILIAS\TestQuestionPool\InternalRequestService::$http
protected

Definition at line 27 of file class.InternalRequestService.php.

◆ $upload

ILIAS FileUpload FileUpload ILIAS\TestQuestionPool\InternalRequestService::$upload
protected

The documentation for this class was generated from the following file: