ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ArrayBasedRequestWrapper.php
Go to the documentation of this file.
1 <?php
2 
3 declare(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 }
__construct(array $raw_values)
GetRequestWrapper constructor.
transform($from)
Perform the transformation.
Interface RequestWrapper.
string $key
Consumer key/client ID value.
Definition: System.php:193
A transformation is a function from one datatype to another.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
retrieve(string $key, Transformation $transformation)