1 | <?php |
||
16 | class ConstructedString extends Structure implements Stringable |
||
17 | { |
||
18 | /** |
||
19 | * Constructor. |
||
20 | * |
||
21 | * @internal Use create() |
||
22 | * |
||
23 | * @param Element ...$elements Any number of elements |
||
24 | */ |
||
25 | 8 | public function __construct(Element ...$elements) |
|
29 | |||
30 | /** |
||
31 | * Create from a list of string type elements |
||
32 | * |
||
33 | * All strings must have the same type. |
||
34 | * |
||
35 | * @param StringType ...$elements |
||
36 | * @throws \LogicException |
||
37 | * @return self |
||
38 | */ |
||
39 | 3 | public static function create(StringType ...$elements): self |
|
54 | |||
55 | /** |
||
56 | * Create from strings with a given type tag. |
||
57 | * |
||
58 | * @param int $tag Type tag for the constructed string element |
||
59 | * @param StringType ...$elements Any number of elements |
||
60 | * @return self |
||
61 | */ |
||
62 | 4 | public static function createWithTag(int $tag, StringType ...$elements) |
|
68 | |||
69 | /** |
||
70 | * Get a list of strings in this structure. |
||
71 | * |
||
72 | * @return string[] |
||
73 | */ |
||
74 | public function strings(): array |
||
80 | |||
81 | /** |
||
82 | * Get the contained strings concatenated together. |
||
83 | * |
||
84 | * @return string |
||
85 | */ |
||
86 | 2 | public function concatenated(): string |
|
90 | |||
91 | /** |
||
92 | * Get the contained strings concatenated together. |
||
93 | * |
||
94 | * @return string |
||
95 | */ |
||
96 | 1 | public function string(): string |
|
100 | |||
101 | /** |
||
102 | * |
||
103 | * @inheritdoc |
||
104 | * @return string |
||
105 | */ |
||
106 | 1 | public function __toString(): string |
|
110 | |||
111 | /** |
||
112 | * |
||
113 | * {@inheritdoc} |
||
114 | * |
||
115 | * @return self |
||
116 | */ |
||
117 | 4 | protected static function _decodeFromDER(Identifier $identifier, |
|
126 | } |
||
127 |