ILIAS  release_8 Revision v8.24
ILIAS\FileUpload\Collection\ImmutableMapWrapper Class Reference

Class ImmutableMapWrapper. More...

+ Inheritance diagram for ILIAS\FileUpload\Collection\ImmutableMapWrapper:
+ Collaboration diagram for ILIAS\FileUpload\Collection\ImmutableMapWrapper:

Public Member Functions

 __construct (StringMap $map)
 ImmutableMapWrapper constructor. More...
 
 get (string $key)
 @inheritDoc More...
 
 toArray ()
 @inheritDoc More...
 
 has (string $key)
 @inheritDoc More...
 
 get (string $key)
 Returns the value of the key from the additional metadata. More...
 
 toArray ()
 Returns all currently known entries. More...
 
 has (string $key)
 Probe if the key is known and associated with a value. More...
 

Private Attributes

ILIAS FileUpload Collection StringMap $map
 

Detailed Description

Class ImmutableMapWrapper.

This class is used to wrap mutable maps to make them immutable and stops the user of the api to cast the list back to a mutable one.

Author
Nicolas Schäfli ns@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Since
5.3
Version
1.0

@Internal

Definition at line 30 of file ImmutableMapWrapper.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\FileUpload\Collection\ImmutableMapWrapper::__construct ( StringMap  $map)

ImmutableMapWrapper constructor.

Parameters
StringMap$mapThe mutable map which should be wrapped.
Since
5.3

Definition at line 42 of file ImmutableMapWrapper.php.

43 {
44 $this->map = $map;
45 }
ILIAS FileUpload Collection StringMap $map

References ILIAS\FileUpload\Collection\ImmutableMapWrapper\$map.

Member Function Documentation

◆ get()

ILIAS\FileUpload\Collection\ImmutableMapWrapper::get ( string  $key)

@inheritDoc

Implements ILIAS\FileUpload\Collection\ImmutableStringMap.

Definition at line 51 of file ImmutableMapWrapper.php.

51 : string
52 {
53 return $this->map->get($key);
54 }
string $key
Consumer key/client ID value.
Definition: System.php:193

References ILIAS\LTI\ToolProvider\$key.

◆ has()

ILIAS\FileUpload\Collection\ImmutableMapWrapper::has ( string  $key)

@inheritDoc

Implements ILIAS\FileUpload\Collection\ImmutableStringMap.

Definition at line 69 of file ImmutableMapWrapper.php.

69 : bool
70 {
71 return $this->map->has($key);
72 }

References ILIAS\LTI\ToolProvider\$key.

◆ toArray()

ILIAS\FileUpload\Collection\ImmutableMapWrapper::toArray ( )

@inheritDoc

Implements ILIAS\FileUpload\Collection\ImmutableStringMap.

Definition at line 60 of file ImmutableMapWrapper.php.

60 : array
61 {
62 return $this->map->toArray();
63 }

Field Documentation

◆ $map

ILIAS FileUpload Collection StringMap ILIAS\FileUpload\Collection\ImmutableMapWrapper::$map
private

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