1 | <?php |
||
12 | abstract class BaseIdentifier implements Identifier |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $value; |
||
18 | |||
19 | 40 | protected function __construct(string $value) |
|
23 | |||
24 | /** |
||
25 | * @param string $value |
||
26 | * @return static |
||
27 | * @throws InvalidIdentifierValueException |
||
28 | */ |
||
29 | 42 | public static function create(string $value) : Identifier |
|
39 | |||
40 | /** |
||
41 | * @param string $value |
||
42 | * @throws InvalidIdentifierValueException |
||
43 | */ |
||
44 | protected static function validate(string $value) : void |
||
47 | |||
48 | 42 | public function getValue() : string |
|
52 | |||
53 | 16 | public function __toString() : string |
|
57 | } |
||
58 |