1 | <?php |
||
21 | class StreamName |
||
|
|||
22 | { |
||
23 | private $name; |
||
24 | private $aggregateId; |
||
25 | |||
26 | public static function fromName(string $name) : self |
||
32 | |||
33 | public static function from(Id $aggregateId, string $name) : self |
||
37 | |||
38 | private function __construct(string $aggregateId, string $name) |
||
43 | |||
44 | private function setName(string $name) : void |
||
49 | |||
50 | private function checkNameIsValid(string $name) : void |
||
56 | |||
57 | public function name() : string |
||
61 | |||
62 | public function aggregateId() : string |
||
66 | |||
67 | public function __toString() : string |
||
71 | } |
||
72 |