ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 (private array $raw_values)
 GetRequestWrapper constructor. More...
 
 retrieve (string $key, Transformation $transformation)
 @inheritDoc More...
 
 has (string $key)
 @inheritDoc More...
 
 keys ()
 @inheritDoc More...
 
 retrieve (string $key, Transformation $transformation)
 
 has (string $key)
 
 keys ()
 Get all keys from the request. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

GetRequestWrapper constructor.

Parameters
mixed[]$raw_values

Definition at line 36 of file ArrayBasedRequestWrapper.php.

37 {
38 }

Member Function Documentation

◆ has()

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

@inheritDoc

Implements ILIAS\HTTP\Wrapper\RequestWrapper.

Definition at line 53 of file ArrayBasedRequestWrapper.php.

53 : bool
54 {
55 return isset($this->raw_values[$key]);
56 }

◆ keys()

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

@inheritDoc

Implements ILIAS\HTTP\Wrapper\RequestWrapper.

Definition at line 61 of file ArrayBasedRequestWrapper.php.

61 : array
62 {
63 return array_keys($this->raw_values);
64 }

Referenced by ilLTITool\parsePostBody().

+ Here is the caller graph for this function:

◆ retrieve()

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

@inheritDoc

Implements ILIAS\HTTP\Wrapper\RequestWrapper.

Definition at line 44 of file ArrayBasedRequestWrapper.php.

45 {
46 return $transformation->transform($this->raw_values[$key] ?? null);
47 }
transform($from)
Perform the transformation.

References ILIAS\Refinery\Transformation\transform().

Referenced by ilLTITool\parsePostBody().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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