ILIAS  release_8 Revision v8.24
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.

34 {
35 $this->initRequest(
36 $http,
38 );
39 $this->upload = $upload;
40 }
Refinery Factory $refinery
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.

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

+ 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.

118 : array
119 {
120 return $this->strArray("id");
121 }

References ILIAS\Repository\strArray().

+ Here is the call graph for this function:

◆ getParsedBody()

ILIAS\TestQuestionPool\InternalRequestService::getParsedBody ( )

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

133 {
134 return $this->http->request()->getParsedBody();
135 }
static http()
Fetches the global http state from ILIAS.

References ILIAS\FileDelivery\http().

+ Here is the call graph for this function:

◆ getProcessedUploads()

ILIAS\TestQuestionPool\InternalRequestService::getProcessedUploads ( )
Returns
\ILIAS\FileUpload\DTO\UploadResult[]

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

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 }

References ILIAS\TestQuestionPool\InternalRequestService\upload().

+ Here is the call graph for this function:

◆ getQuestionId()

ILIAS\TestQuestionPool\InternalRequestService::getQuestionId ( )

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

112 : int
113 {
114 return $this->int('q_id');
115 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ getRefId()

ILIAS\TestQuestionPool\InternalRequestService::getRefId ( )

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

102 : int
103 {
104 return $this->int("ref_id");
105 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ getUnitCategoryIds()

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

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

148 : array
149 {
150 return $this->intArray("category_ids");
151 }

References ILIAS\Repository\intArray().

+ Here is the call graph for this function:

◆ getUnitIds()

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

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

140 : array
141 {
142 return $this->intArray("unit_ids");
143 }

References ILIAS\Repository\intArray().

+ Here is the call graph for this function:

◆ hasQuestionId()

ILIAS\TestQuestionPool\InternalRequestService::hasQuestionId ( )

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

107 : bool
108 {
109 return $this->raw('q_id') !== null;
110 }

References ILIAS\TestQuestionPool\InternalRequestService\raw().

+ Here is the call graph for this function:

◆ hasRefId()

ILIAS\TestQuestionPool\InternalRequestService::hasRefId ( )

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

97 : int
98 {
99 return $this->raw('ref_id') !== null;
100 }

References ILIAS\TestQuestionPool\InternalRequestService\raw().

+ Here is the call graph for this function:

◆ isset()

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

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

93 : bool
94 {
95 return $this->raw($key) !== null;
96 }
string $key
Consumer key/client ID value.
Definition: System.php:193

References ILIAS\TestQuestionPool\InternalRequestService\raw().

+ Here is the call graph for this function:

◆ raw()

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

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

127 {
128 $no_transform = $this->refinery->identity();
129 return $this->get($key, $no_transform);
130 }

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

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

+ 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: