ILIAS  release_8 Revision v8.24
ILIAS\Test\InternalRequestService Class Reference
+ Collaboration diagram for ILIAS\Test\InternalRequestService:

Public Member Functions

 __construct (\ILIAS\HTTP\Services $http, \ILIAS\Refinery\Factory $refinery)
 
 isset (string $key)
 
 hasRefId ()
 
 getRefId ()
 
 getIds ()
 
 hasQuestionId ()
 
 getQuestionId ()
 
 getQuestionIds ()
 
 getCallingTest ()
 
 getNextCommand ()
 
 getActiveId ()
 
 getPassId ()
 
 raw (string $key)
 
 strVal (string $key)
 
 getParsedBody ()
 

Protected Attributes

ILIAS HTTP Services $http
 
array $params
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Test\InternalRequestService::__construct ( \ILIAS\HTTP\Services  $http,
\ILIAS\Refinery\Factory  $refinery 
)

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

33 {
34 $this->initRequest(
35 $http,
37 );
38 }
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, and ILIAS\Repository\initRequest().

+ Here is the call graph for this function:

Member Function Documentation

◆ getActiveId()

ILIAS\Test\InternalRequestService::getActiveId ( )

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

86 : int
87 {
88 return $this->int('active_id');
89 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ getCallingTest()

ILIAS\Test\InternalRequestService::getCallingTest ( )

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

76 : int
77 {
78 return $this->int('calling_test');
79 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ getIds()

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

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

56 : array
57 {
58 return $this->strArray("id");
59 }

References ILIAS\Repository\strArray().

+ Here is the call graph for this function:

◆ getNextCommand()

ILIAS\Test\InternalRequestService::getNextCommand ( )

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

81 : string
82 {
83 return $this->str('nextCommand');
84 }

References ILIAS\Repository\str().

+ Here is the call graph for this function:

◆ getParsedBody()

ILIAS\Test\InternalRequestService::getParsedBody ( )

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

110 : ?array
111 {
112 return $this->http->request()->getParsedBody();
113 }
static http()
Fetches the global http state from ILIAS.

References ILIAS\FileDelivery\http().

+ Here is the call graph for this function:

◆ getPassId()

ILIAS\Test\InternalRequestService::getPassId ( )

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

91 : int
92 {
93 return $this->int('pass_id');
94 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ getQuestionId()

ILIAS\Test\InternalRequestService::getQuestionId ( )

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

66 : int
67 {
68 return $this->int('q_id');
69 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ getQuestionIds()

ILIAS\Test\InternalRequestService::getQuestionIds ( )

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

71 : array
72 {
73 return $this->intArray('q_id');
74 }

References ILIAS\Repository\intArray().

+ Here is the call graph for this function:

◆ getRefId()

ILIAS\Test\InternalRequestService::getRefId ( )

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

50 : int
51 {
52 return $this->int("ref_id");
53 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ hasQuestionId()

ILIAS\Test\InternalRequestService::hasQuestionId ( )

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

61 : bool
62 {
63 return $this->raw('q_id') !== null;
64 }

References ILIAS\Test\InternalRequestService\raw().

+ Here is the call graph for this function:

◆ hasRefId()

ILIAS\Test\InternalRequestService::hasRefId ( )

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

45 : int
46 {
47 return $this->raw('ref_id') !== null;
48 }

References ILIAS\Test\InternalRequestService\raw().

+ Here is the call graph for this function:

◆ isset()

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

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

40 : bool
41 {
42 return $this->raw($key) !== null;
43 }
string $key
Consumer key/client ID value.
Definition: System.php:193

References ILIAS\Test\InternalRequestService\raw().

+ Here is the call graph for this function:

◆ raw()

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

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

100 {
101 $no_transform = $this->refinery->identity();
102 return $this->get($key, $no_transform);
103 }

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ strVal()

ILIAS\Test\InternalRequestService::strVal ( string  $key)

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

105 : string
106 {
107 return $this->str($key);
108 }

References ILIAS\Repository\str().

+ Here is the call graph for this function:

Field Documentation

◆ $http

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

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

◆ $params

array ILIAS\Test\InternalRequestService::$params
protected

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


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