|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace SimpleSAML\XML\XML\xml; |
|
6
|
|
|
|
|
7
|
|
|
use SimpleSAML\XML\Type\{BaseValue, IDValue, LangValue, SpaceValue}; |
|
8
|
|
|
|
|
9
|
|
|
/** |
|
10
|
|
|
* Trait grouping common functionality for elements that use the specialAttrs-attributeGroup. |
|
11
|
|
|
* |
|
12
|
|
|
* @package simplesamlphp/xml-common |
|
13
|
|
|
*/ |
|
14
|
|
|
trait SpecialAttrsTrait |
|
15
|
|
|
{ |
|
16
|
|
|
/** |
|
17
|
|
|
* The base. |
|
18
|
|
|
* |
|
19
|
|
|
* @var \SimpleSAML\XML\Type\BaseValue|null |
|
20
|
|
|
*/ |
|
21
|
|
|
protected ?BaseValue $base = null; |
|
22
|
|
|
|
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* The id. |
|
26
|
|
|
* |
|
27
|
|
|
* @var \SimpleSAML\XML\Type\IDValue|null |
|
28
|
|
|
*/ |
|
29
|
|
|
protected ?IDValue $id = null; |
|
30
|
|
|
|
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* The lang. |
|
34
|
|
|
* |
|
35
|
|
|
* @var \SimpleSAML\XML\Type\LangValue|null |
|
36
|
|
|
*/ |
|
37
|
|
|
protected ?LangValue $lang = null; |
|
38
|
|
|
|
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* The space. |
|
42
|
|
|
* |
|
43
|
|
|
* @var \SimpleSAML\XML\Type\SpaceValue|null |
|
44
|
|
|
*/ |
|
45
|
|
|
protected ?SpaceValue $space = null; |
|
46
|
|
|
|
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* Collect the value of the base-property |
|
50
|
|
|
* |
|
51
|
|
|
* @return \SimpleSAML\XML\Type\BaseValue|null |
|
52
|
|
|
*/ |
|
53
|
|
|
public function getBase(): ?BaseValue |
|
54
|
|
|
{ |
|
55
|
|
|
return $this->base; |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* Set the value of the base-property |
|
61
|
|
|
* |
|
62
|
|
|
* @param \SimpleSAML\XML\Type\BaseValue|null $base |
|
63
|
|
|
*/ |
|
64
|
|
|
protected function setBase(?BaseValue $base): void |
|
65
|
|
|
{ |
|
66
|
|
|
$this->base = $base; |
|
67
|
|
|
} |
|
68
|
|
|
|
|
69
|
|
|
|
|
70
|
|
|
/** |
|
71
|
|
|
* Collect the value of the id-property |
|
72
|
|
|
* |
|
73
|
|
|
* @return \SimpleSAML\XML\Type\IDValue|null |
|
74
|
|
|
*/ |
|
75
|
|
|
public function getId(): ?IDValue |
|
76
|
|
|
{ |
|
77
|
|
|
return $this->id; |
|
78
|
|
|
} |
|
79
|
|
|
|
|
80
|
|
|
|
|
81
|
|
|
/** |
|
82
|
|
|
* Set the value of the id-property |
|
83
|
|
|
* |
|
84
|
|
|
* @param \SimpleSAML\XML\Type\IDValue|null $id |
|
85
|
|
|
*/ |
|
86
|
|
|
protected function setID(?IDValue $id): void |
|
87
|
|
|
{ |
|
88
|
|
|
$this->id = $id; |
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
|
|
92
|
|
|
/** |
|
93
|
|
|
* Collect the value of the lang-property |
|
94
|
|
|
* |
|
95
|
|
|
* @return \SimpleSAML\XML\Type\LangValue|null |
|
96
|
|
|
*/ |
|
97
|
|
|
public function getLang(): ?LangValue |
|
98
|
|
|
{ |
|
99
|
|
|
return $this->lang; |
|
100
|
|
|
} |
|
101
|
|
|
|
|
102
|
|
|
|
|
103
|
|
|
/** |
|
104
|
|
|
* Set the value of the lang-property |
|
105
|
|
|
* |
|
106
|
|
|
* @param \SimpleSAML\XML\Type\LangValue|null $id |
|
107
|
|
|
*/ |
|
108
|
|
|
protected function setLang(?LangValue $lang): void |
|
109
|
|
|
{ |
|
110
|
|
|
$this->lang = $lang; |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
|
|
114
|
|
|
/** |
|
115
|
|
|
* Collect the value of the space-property |
|
116
|
|
|
* |
|
117
|
|
|
* @return \SimpleSAML\XML\Type\SpaceValue|null |
|
118
|
|
|
*/ |
|
119
|
|
|
public function getSpace(): ?SpaceValue |
|
120
|
|
|
{ |
|
121
|
|
|
return $this->space; |
|
122
|
|
|
} |
|
123
|
|
|
|
|
124
|
|
|
|
|
125
|
|
|
/** |
|
126
|
|
|
* Set the value of the space-property |
|
127
|
|
|
* |
|
128
|
|
|
* @param \SimpleSAML\XML\Type\SpaceValue|null $id |
|
129
|
|
|
*/ |
|
130
|
|
|
protected function setSpace(?SpaceValue $space): void |
|
131
|
|
|
{ |
|
132
|
|
|
$this->space = $space; |
|
133
|
|
|
} |
|
134
|
|
|
} |
|
135
|
|
|
|