ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
IdentificationMap.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 
30 {
31  protected static array $map = [];
32 
33  public function addToMap(IdentificationInterface $identification): void
34  {
35  self::$map[$identification->serialize()] = $identification;
36  }
37 
38  public function isInMap(string $serialized): bool
39  {
40  return isset(self::$map[$serialized]);
41  }
42 
43  public function getFromMap(string $serialized): IdentificationInterface
44  {
45  return self::$map[$serialized];
46  }
47 }
addToMap(IdentificationInterface $identification)