1 | <?php |
||
24 | class RoleAttributeValue extends AttributeValue |
||
25 | { |
||
26 | /** |
||
27 | * Issuing authority. |
||
28 | * |
||
29 | * @var GeneralNames $_roleAuthority |
||
30 | */ |
||
31 | protected $_roleAuthority; |
||
32 | |||
33 | /** |
||
34 | * Role name. |
||
35 | * |
||
36 | * @var GeneralName $_roleName |
||
37 | */ |
||
38 | protected $_roleName; |
||
39 | |||
40 | /** |
||
41 | * Constructor. |
||
42 | * |
||
43 | * @param GeneralName $name Role name |
||
44 | * @param GeneralNames|null $authority Issuing authority |
||
45 | */ |
||
46 | 15 | public function __construct(GeneralName $name, GeneralNames $authority = null) |
|
52 | |||
53 | /** |
||
54 | * Initialize from a role string. |
||
55 | * |
||
56 | * @param string $role_name Role name in URI format |
||
57 | * @param GeneralNames|null $authority Issuing authority |
||
58 | * @return self |
||
59 | */ |
||
60 | 2 | public static function fromString(string $role_name, |
|
65 | |||
66 | /** |
||
67 | * |
||
68 | * @param UnspecifiedType $el |
||
69 | * @return self |
||
70 | */ |
||
71 | 8 | public static function fromASN1(UnspecifiedType $el): self |
|
87 | |||
88 | /** |
||
89 | * Check whether issuing authority is present. |
||
90 | * |
||
91 | * @return bool |
||
92 | */ |
||
93 | 2 | public function hasRoleAuthority(): bool |
|
97 | |||
98 | /** |
||
99 | * Get issuing authority. |
||
100 | * |
||
101 | * @throws \LogicException |
||
102 | * @return GeneralNames |
||
103 | */ |
||
104 | 2 | public function roleAuthority(): GeneralNames |
|
111 | |||
112 | /** |
||
113 | * Get role name. |
||
114 | * |
||
115 | * @return GeneralName |
||
116 | */ |
||
117 | 2 | public function roleName(): GeneralName |
|
121 | |||
122 | /** |
||
123 | * |
||
124 | * @see \X501\ASN1\AttributeValue\AttributeValue::toASN1() |
||
125 | * @return Sequence |
||
126 | */ |
||
127 | 17 | public function toASN1(): Sequence |
|
137 | |||
138 | /** |
||
139 | * |
||
140 | * @see \X501\ASN1\AttributeValue\AttributeValue::stringValue() |
||
141 | * @return string |
||
142 | */ |
||
143 | 3 | public function stringValue(): string |
|
147 | |||
148 | /** |
||
149 | * |
||
150 | * @see \X501\ASN1\AttributeValue\AttributeValue::equalityMatchingRule() |
||
151 | * @return BinaryMatch |
||
152 | */ |
||
153 | 1 | public function equalityMatchingRule(): BinaryMatch |
|
157 | |||
158 | /** |
||
159 | * |
||
160 | * @see \X501\ASN1\AttributeValue\AttributeValue::rfc2253String() |
||
161 | * @return string |
||
162 | */ |
||
163 | 1 | public function rfc2253String(): string |
|
167 | |||
168 | /** |
||
169 | * |
||
170 | * @see \X501\ASN1\AttributeValue\AttributeValue::_transcodedString() |
||
171 | * @return string |
||
172 | */ |
||
173 | 1 | protected function _transcodedString(): string |
|
177 | } |
||
178 |