ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
IdentificationMap.php
Go to the documentation of this file.
2
4
11{
12
16 protected static $map = [];
17
18
22 public function addToMap(IdentificationInterface $identification)
23 {
24 self::$map[$identification->serialize()] = $identification;
25 }
26
27
33 public function isInMap(string $serialized) : bool
34 {
35 return isset(self::$map[$serialized]);
36 }
37
38
44 public function getFromMap(string $serialized) : IdentificationInterface
45 {
46 return self::$map[$serialized];
47 }
48}
An exception for terminatinating execution or to throw for unit testing.
addToMap(IdentificationInterface $identification)