1 | <?php |
||
14 | final class Name |
||
15 | { |
||
16 | /** @var string */ |
||
17 | public $name; |
||
18 | |||
19 | /** @var int */ |
||
20 | public $sequence = 0; |
||
21 | |||
22 | /** |
||
23 | * Name constructor. |
||
24 | */ |
||
25 | protected function __construct() |
||
28 | |||
29 | /** |
||
30 | * @param string $name |
||
31 | * @param int $sequence |
||
32 | * @return Name |
||
33 | */ |
||
34 | public static function createWithSequence(string $name, int $sequence): Name |
||
42 | |||
43 | /** |
||
44 | * @param string $name |
||
45 | * @return Name |
||
46 | */ |
||
47 | public static function create(string $name): Name |
||
54 | |||
55 | /** |
||
56 | * @param string|null $delimiter |
||
57 | * @return string |
||
58 | */ |
||
59 | public function fullName(string $delimiter = null): string |
||
72 | } |
||
73 |