ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
AbstractIdentificationProvider.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
21 
25 
31 {
35  protected $map;
39  protected $provider;
40 
44  protected $serializer;
48  protected $class_name = '';
52  protected static $instances = [];
53 
61  {
62  $this->map = $map;
63  $this->provider = $provider;
64  $this->class_name = get_class($provider);
65  $this->serializer = $serializer;
66  }
67 
72  public function fromSerializedString(string $serialized_string) : IdentificationInterface
73  {
74  if ($this->map->isInMap($serialized_string)) {
75  return $this->map->getFromMap($serialized_string);
76  }
78  $identification = $this->serializer->unserialize($serialized_string);
79  $this->map->addToMap($identification);
80 
81  return $identification;
82  }
83 }
__construct(Provider $provider, SerializerInterface $serializer, IdentificationMap $map)
CoreIdentificationProvider constructor.