1 | <?php declare(strict_types=1); |
||
31 | class PassportAccount implements PassportAccountInterface |
||
32 | { |
||
33 | /** |
||
34 | * @var array |
||
35 | */ |
||
36 | private $properties; |
||
37 | |||
38 | /** |
||
39 | * @var DatabaseSchemaInterface |
||
40 | */ |
||
41 | private $schema; |
||
42 | |||
43 | /** |
||
44 | * @var bool|string |
||
45 | */ |
||
46 | private $userIdentityKey = false; |
||
47 | |||
48 | /** |
||
49 | * @var bool|string |
||
50 | */ |
||
51 | private $clientIdentityKey = false; |
||
52 | |||
53 | /** |
||
54 | * @var bool|string |
||
55 | */ |
||
56 | private $scopesKey = false; |
||
57 | |||
58 | /** |
||
59 | * @param DatabaseSchemaInterface $schema |
||
60 | * @param array $properties |
||
61 | */ |
||
62 | 2 | public function __construct(DatabaseSchemaInterface $schema, array $properties = []) |
|
67 | |||
68 | /** |
||
69 | * @inheritdoc |
||
70 | */ |
||
71 | 2 | public function setPassportProperties(array $properties): PassportAccountInterface |
|
77 | |||
78 | /** |
||
79 | * @inheritdoc |
||
80 | */ |
||
81 | 1 | public function hasProperty($key): bool |
|
87 | |||
88 | /** |
||
89 | * @inheritdoc |
||
90 | */ |
||
91 | 1 | public function getProperty($key) |
|
99 | |||
100 | /** |
||
101 | * @inheritdoc |
||
102 | */ |
||
103 | 1 | public function hasUserIdentity(): bool |
|
107 | |||
108 | /** |
||
109 | * @inheritdoc |
||
110 | */ |
||
111 | 1 | public function getUserIdentity() |
|
115 | |||
116 | /** |
||
117 | * @inheritdoc |
||
118 | */ |
||
119 | 1 | public function hasClientIdentity(): bool |
|
123 | |||
124 | /** |
||
125 | * @inheritdoc |
||
126 | */ |
||
127 | 1 | public function getClientIdentity() |
|
131 | |||
132 | /** |
||
133 | * @inheritdoc |
||
134 | */ |
||
135 | 1 | public function hasScopes(): bool |
|
139 | |||
140 | /** |
||
141 | * @inheritdoc |
||
142 | */ |
||
143 | 1 | public function getScopes(): array |
|
147 | |||
148 | /** |
||
149 | * @inheritdoc |
||
150 | */ |
||
151 | 1 | public function hasScope(string $scope): bool |
|
155 | |||
156 | /** |
||
157 | * @return string |
||
158 | */ |
||
159 | 1 | protected function getUserIdentityKey(): string |
|
167 | |||
168 | /** |
||
169 | * @return string |
||
170 | */ |
||
171 | 1 | protected function getClientIdentityKey(): string |
|
179 | |||
180 | /** |
||
181 | * @return string |
||
182 | */ |
||
183 | 1 | protected function getScopesKey(): string |
|
191 | |||
192 | /** |
||
193 | * @return DatabaseSchemaInterface |
||
194 | */ |
||
195 | 1 | protected function getSchema(): DatabaseSchemaInterface |
|
199 | } |
||
200 |