ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
NullIdentification.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
28{
33 public function __construct(protected ?IdentificationInterface $wrapped_identification = null)
34 {
35 }
36
40 public function serialize()
41 {
42 if ($this->wrapped_identification !== null) {
43 return $this->wrapped_identification->serialize();
44 }
45
46 return "";
47 }
48
52 public function unserialize($serialized): void
53 {
54 // noting to do
55 }
56
60 public function getClassName(): string
61 {
62 if ($this->wrapped_identification !== null) {
63 return $this->wrapped_identification->getClassName();
64 }
65
66 return "Null";
67 }
68
72 public function getInternalIdentifier(): string
73 {
74 if ($this->wrapped_identification !== null) {
75 return $this->wrapped_identification->getInternalIdentifier();
76 }
77
78 return "Null";
79 }
80
84 public function getProviderNameForPresentation(): string
85 {
86 if ($this->wrapped_identification !== null) {
87 return $this->wrapped_identification->getProviderNameForPresentation();
88 }
89
90 return "Null";
91 }
92
93 public function __serialize(): array
94 {
95 return ['data' => $this->serialize()];
96 }
97
98 public function __unserialize(array $data): void
99 {
100 $this->unserialize($data['data']);
101 }
102}
__construct(protected ?IdentificationInterface $wrapped_identification=null)
NullIdentification constructor.