| 1 | <?php |
||
| 5 | class StreamId |
||
| 6 | { |
||
| 7 | const ALL = '$all'; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $value; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var bool |
||
| 16 | */ |
||
| 17 | private $isSystem = false; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var bool |
||
| 21 | */ |
||
| 22 | private $isMetadata = false; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * EventStream constructor. |
||
| 26 | * |
||
| 27 | * @param string $value |
||
| 28 | */ |
||
| 29 | public function __construct(string $value = '') |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param $value |
||
| 47 | * @param $prefix |
||
| 48 | * |
||
| 49 | * @return bool |
||
| 50 | */ |
||
| 51 | private function startsWith(string $value, string $prefix): bool |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return bool |
||
| 58 | */ |
||
| 59 | public function isSystem(): bool |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @return bool |
||
| 66 | */ |
||
| 67 | public function isMetadata(): bool |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @return string |
||
| 74 | */ |
||
| 75 | public function toString(): string |
||
| 79 | } |
||
| 80 |