1 | <?php |
||
9 | abstract class Extension |
||
10 | { |
||
11 | protected const IDENTIFIERS_SEPARATOR = '.'; |
||
12 | |||
13 | private $identifiers; |
||
14 | |||
15 | 38 | protected function __construct(string ...$identifiers) |
|
23 | |||
24 | /** |
||
25 | * @throws InvalidVersion |
||
26 | */ |
||
27 | abstract protected function validate(string $identifier): void; |
||
28 | |||
29 | 8 | public static function from(string $identifier, string ...$identifiers) |
|
33 | |||
34 | 30 | public static function fromString(string $extension) |
|
38 | |||
39 | 29 | public function getIdentifiers(): array |
|
43 | |||
44 | 9 | public function toString(): string |
|
48 | |||
49 | public function __toString(): string |
||
53 | } |
||
54 |