ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilGSIdentificationStorage.php
Go to the documentation of this file.
1<?php
2
9{
10
20 protected $identification;
28 protected $provider_class = '';
36 protected $active = true;
40 protected $connector_container_name = "il_gs_identifications";
41
42
47 public static function registerIdentification(\ILIAS\GlobalScreen\Identification\IdentificationInterface $identification, \ILIAS\GlobalScreen\Provider\Provider $provider)
48 {
50 if ($gsi === null) {
51 $gsi = new ilGSIdentificationStorage();
52 $gsi->setIdentification($identification->serialize());
53 $gsi->setProviderClass(get_class($provider));
54 $gsi->create();
55 }
56 $gsi->update();
57 }
58
59
63 public function getCache() : ilGlobalCache
64 {
66 }
67
68
69 final public function create()
70 {
71 if (empty($this->identification)) {
72 throw new LogicException("Cannot store without identification");
73 }
74 parent::create();
75 }
76
77
81 public function getIdentification() : string
82 {
84 }
85
86
93 {
94 $this->identification = $identification;
95
96 return $this;
97 }
98
99
103 public function getProviderClass() : string
104 {
106 }
107
108
115 {
116 $this->provider_class = $provider_class;
117
118 return $this;
119 }
120
121
125 public function isActive() : bool
126 {
127 return $this->active;
128 }
129
130
137 {
138 $this->active = $active;
139
140 return $this;
141 }
142}
An exception for terminatinating execution or to throw for unit testing.
Class CachedActiveRecord.
static find($primary_key, array $add_constructor_args=array())
@inheritDoc
static registerIdentification(\ILIAS\GlobalScreen\Identification\IdentificationInterface $identification, \ILIAS\GlobalScreen\Provider\Provider $provider)
Class ilGlobalCache.
static getInstance($component)
Class BaseForm.