ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
SuperGlobalDropInReplacement.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\HTTP\Wrapper;
22
25use LogicException;
26use OutOfBoundsException;
27
34{
35 public function __construct(Factory $factory, array $raw_values)
36 {
37 parent::__construct($raw_values, $factory->kindlyTo()->string());
38 }
39
40 #[\Override]
41 public function offsetSet(mixed $offset, mixed $value): void
42 {
43 throw new OutOfBoundsException("Modifying global Request-Array such as \$_GET is not allowed!");
44
45 parent::offsetSet($offset, $value);
46 }
47
48 #[\Override]
49 public function offsetUnset(mixed $offset): void
50 {
51 throw new LogicException("Modifying global Request-Array such as \$_GET is not allowed!");
52 }
53}
Builds data types.
Definition: Factory.php:36
Class SuperGlobalDropInReplacement This Class wraps SuperGlobals such as $_GET and $_POST to prevent ...
kindlyTo()
Combined validations and transformations for primitive data types that establish a baseline for furth...
Definition: Factory.php:55
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc