ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
RequestParser.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ILIAS\Refinery\Factory as Refinery;
26
28{
31
32 public function __construct(
35 ) {
36 $this->http = $http;
37 $this->refinery = $refinery;
38 }
39
40 public function fetchRefID(): int
41 {
42 $request_wrapper = $this->http->wrapper()->query();
44 return $request_wrapper->retrieve(
46 $this->refinery->kindlyTo()->int()
47 );
48 }
49 throw new ilMDEditorException('ref_id for control center not found.');
50 }
51
52 public function fetchObjID(): int
53 {
54 $request_wrapper = $this->http->wrapper()->query();
56 return $request_wrapper->retrieve(
58 $this->refinery->kindlyTo()->int()
59 );
60 }
61 throw new ilMDEditorException('obj_id for control center not found.');
62 }
63
64 public function fetchType(): string
65 {
66 $request_wrapper = $this->http->wrapper()->query();
68 return $request_wrapper->retrieve(
70 $this->refinery->kindlyTo()->string()
71 );
72 }
73 throw new ilMDEditorException('type for control center not found.');
74 }
75}
Builds data types.
Definition: Factory.php:36
__construct(GlobalHttpState $http, Refinery $refinery)
Interface GlobalHttpState.
static http()
Fetches the global http state from ILIAS.