ILIAS  release_8 Revision v8.24
ArrayBasedRequestWrapper.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
24
31{
32 private array $raw_values;
33
34
39 public function __construct(array $raw_values)
40 {
41 $this->raw_values = $raw_values;
42 }
43
44
48 public function retrieve(string $key, Transformation $transformation)
49 {
50 return $transformation->transform($this->raw_values[$key] ?? null);
51 }
52
53
57 public function has(string $key): bool
58 {
59 return isset($this->raw_values[$key]);
60 }
61}
retrieve(string $key, Transformation $transformation)
@inheritDoc
__construct(array $raw_values)
GetRequestWrapper constructor.
Interface RequestWrapper.
A transformation is a function from one datatype to another.
transform($from)
Perform the transformation.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
string $key
Consumer key/client ID value.
Definition: System.php:193