ILIAS  trunk Revision v11.0_alpha-1862-g4e205cb56d4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ImmutableMapWrapper Class Reference

Class ImmutableMapWrapper. More...

+ Inheritance diagram for ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ImmutableMapWrapper:
+ Collaboration diagram for ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ImmutableMapWrapper:

Public Member Functions

 __construct (private StringMap $map)
 ImmutableMapWrapper constructor. More...
 
 get (string $key)
 
 toArray ()
 
 has (string $key)
 

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

Definition at line 33 of file ImmutableMapWrapper.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ImmutableMapWrapper::__construct ( private 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  }

Member Function Documentation

◆ get()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ImmutableMapWrapper::get ( string  $key)

Implements ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ImmutableStringMap.

Definition at line 50 of file ImmutableMapWrapper.php.

50  : string
51  {
52  return $this->map->get($key);
53  }

◆ has()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ImmutableMapWrapper::has ( string  $key)

Implements ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ImmutableStringMap.

Definition at line 68 of file ImmutableMapWrapper.php.

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

◆ toArray()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ImmutableMapWrapper::toArray ( )

Implements ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ImmutableStringMap.

Definition at line 59 of file ImmutableMapWrapper.php.

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

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