ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\HTTP\Wrapper\SuperGlobalDropInReplacement Class Reference

Class SuperGlobalDropInReplacement This Class wraps SuperGlobals such as $_GET and $_POST to prevent modifying them in a future version. More...

+ Inheritance diagram for ILIAS\HTTP\Wrapper\SuperGlobalDropInReplacement:
+ Collaboration diagram for ILIAS\HTTP\Wrapper\SuperGlobalDropInReplacement:

Public Member Functions

 __construct (Factory $factory, array $raw_values, private bool $throwOnValueAssignment=false)
 
 offsetSet (mixed $offset, mixed $value)
 
 offsetUnset (mixed $offset)
 
- Public Member Functions inherited from ILIAS\Refinery\KeyValueAccess
 __construct (array $raw_values, Transformation $trafo)
 
 offsetExists (mixed $offset)
 
 offsetGet (mixed $offset)
 
 offsetSet (mixed $offset, mixed $value)
 
 offsetUnset (mixed $offset)
 
 count ()
 

Detailed Description

Class SuperGlobalDropInReplacement This Class wraps SuperGlobals such as $_GET and $_POST to prevent modifying them in a future version.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 33 of file SuperGlobalDropInReplacement.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\HTTP\Wrapper\SuperGlobalDropInReplacement::__construct ( Factory  $factory,
array  $raw_values,
private bool  $throwOnValueAssignment = false 
)

Definition at line 35 of file SuperGlobalDropInReplacement.php.

36 {
37 parent::__construct($raw_values, $factory->kindlyTo()->string());
38 }
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

References ILIAS\Refinery\KeyValueAccess\$raw_values, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Refinery\Factory\kindlyTo().

+ Here is the call graph for this function:

Member Function Documentation

◆ offsetSet()

ILIAS\HTTP\Wrapper\SuperGlobalDropInReplacement::offsetSet ( mixed  $offset,
mixed  $value 
)

Reimplemented from ILIAS\Refinery\KeyValueAccess.

Definition at line 41 of file SuperGlobalDropInReplacement.php.

41 : void
42 {
43 if ($this->throwOnValueAssignment) {
44 throw new OutOfBoundsException("Modifying global Request-Array such as \$_GET is not allowed!");
45 }
46
47 parent::offsetSet($offset, $value);
48 }

◆ offsetUnset()

ILIAS\HTTP\Wrapper\SuperGlobalDropInReplacement::offsetUnset ( mixed  $offset)

Reimplemented from ILIAS\Refinery\KeyValueAccess.

Definition at line 51 of file SuperGlobalDropInReplacement.php.

51 : void
52 {
53 throw new LogicException("Modifying global Request-Array such as \$_GET is not allowed!");
54 }

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