1 | <?php |
||
9 | abstract class Extension |
||
10 | { |
||
11 | protected const IDENTIFIERS_SEPARATOR = '.'; |
||
12 | |||
13 | /** @var array */ |
||
14 | private $identifiers; |
||
15 | |||
16 | 38 | protected function __construct(string ...$identifiers) |
|
24 | |||
25 | 85 | public static function empty() |
|
35 | |||
36 | /** |
||
37 | * @throws InvalidVersion |
||
38 | */ |
||
39 | abstract protected function validate(string $identifier): void; |
||
40 | |||
41 | 8 | public static function from(string $identifier, string ...$identifiers) |
|
45 | |||
46 | 30 | public static function fromString(string $extension) |
|
50 | |||
51 | 58 | public function getIdentifiers(): array |
|
55 | |||
56 | 9 | public function toString(): string |
|
60 | |||
61 | public function __toString(): string |
||
65 | } |
||
66 |