ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
AbstractIdentification.php
Go to the documentation of this file.
2
5
12{
13
21 protected $serializer;
25 protected $internal_identifier = '';
29 protected $classname = '';
30
31
41 {
42 $this->provider_presentation_name = $provider_presentation_name;
43 $this->serializer = $serializer;
44 $this->internal_identifier = $internal_identifier;
45 $this->classname = $classname;
46 }
47
48
52 public function serialize()
53 {
54 return $this->serializer->serialize($this);
55 }
56
57
61 public function unserialize($serialized)
62 {
63 throw new \LogicException("Please use the identification factory to unserialize");
64 }
65
66
70 public function getClassName() : string
71 {
72 return $this->classname;
73 }
74
75
79 public function getInternalIdentifier() : string
80 {
82 }
83
84
88 public function getProviderNameForPresentation() : string
89 {
90 global $DIC;
94 $provider = new $this->classname($DIC);
95
96 return $provider->getProviderNameForPresentation();
97 }
98}
An exception for terminatinating execution or to throw for unit testing.
__construct(string $internal_identifier, string $classname, SerializerInterface $serializer, string $provider_presentation_name)
CoreIdentification constructor.
$DIC
Definition: xapitoken.php:46