ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
AbstractIdentificationProvider.php
Go to the documentation of this file.
2
6
13{
14
18 protected $map;
22 protected $provider;
26 protected $serializer;
30 protected $class_name = '';
34 protected static $instances = [];
35
36
45 {
46 $this->map = $map;
47 $this->provider = $provider;
48 $this->class_name = get_class($provider);
49 $this->serializer = $serializer;
50 ;
51 }
52
53
59 public function fromSerializedString(string $serialized_string) : IdentificationInterface
60 {
61 if ($this->map->isInMap($serialized_string)) {
62 return $this->map->getFromMap($serialized_string);
63 }
64 $identification = $this->serializer->unserialize($serialized_string);
65 $this->map->addToMap($identification);
66
67 return $identification;
68 }
69}
An exception for terminatinating execution or to throw for unit testing.
__construct(Provider $provider, SerializerInterface $serializer, IdentificationMap $map)
CoreIdentificationProvider constructor.