ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ILIAS\HTTP\Wrapper\ArrayBasedRequestWrapper Class Reference

Class ArrayBasedRequestWrapper. More...

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

Public Member Functions

 __construct (array $raw_values)
 GetRequestWrapper constructor. More...
 
 retrieve (string $key, Transformation $transformation)
 
 has (string $key)
 
 keys ()
 

Private Attributes

array $raw_values
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\HTTP\Wrapper\ArrayBasedRequestWrapper::__construct ( array  $raw_values)

GetRequestWrapper constructor.

Parameters
mixed[]$raw_values

Definition at line 39 of file ArrayBasedRequestWrapper.php.

References ILIAS\HTTP\Wrapper\ArrayBasedRequestWrapper\$raw_values.

40  {
41  $this->raw_values = $raw_values;
42  }

Member Function Documentation

◆ has()

ILIAS\HTTP\Wrapper\ArrayBasedRequestWrapper::has ( string  $key)

Implements ILIAS\HTTP\Wrapper\RequestWrapper.

Definition at line 57 of file ArrayBasedRequestWrapper.php.

57  : bool
58  {
59  return isset($this->raw_values[$key]);
60  }

◆ keys()

ILIAS\HTTP\Wrapper\ArrayBasedRequestWrapper::keys ( )

Implements ILIAS\HTTP\Wrapper\RequestWrapper.

Definition at line 65 of file ArrayBasedRequestWrapper.php.

Referenced by ilLTITool\parsePostBody().

65  : array
66  {
67  return array_keys($this->raw_values);
68  }
+ Here is the caller graph for this function:

◆ retrieve()

ILIAS\HTTP\Wrapper\ArrayBasedRequestWrapper::retrieve ( string  $key,
Transformation  $transformation 
)

Implements ILIAS\HTTP\Wrapper\RequestWrapper.

Definition at line 48 of file ArrayBasedRequestWrapper.php.

References ILIAS\Refinery\Transformation\transform().

Referenced by ilLTITool\parsePostBody().

49  {
50  return $transformation->transform($this->raw_values[$key] ?? null);
51  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $raw_values

array ILIAS\HTTP\Wrapper\ArrayBasedRequestWrapper::$raw_values
private

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