ILIAS  release_7 Revision v7.30-3-g800a261c036
IdentificationMap.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
21
23
29{
33 protected static $map = [];
34
35 public function addToMap(IdentificationInterface $identification) : void
36 {
37 self::$map[$identification->serialize()] = $identification;
38 }
39
40 public function isInMap(string $serialized) : bool
41 {
42 return isset(self::$map[$serialized]);
43 }
44
45 public function getFromMap(string $serialized) : IdentificationInterface
46 {
47 return self::$map[$serialized];
48 }
49}
An exception for terminatinating execution or to throw for unit testing.
addToMap(IdentificationInterface $identification)