1 | <?php |
||
9 | class Status |
||
10 | { |
||
11 | private const SCHEDULED = 'scheduled'; |
||
12 | private const POSTPONED = 'postponed'; |
||
13 | private const CANCELLED = 'cancelled'; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $value; |
||
19 | |||
20 | private function __construct(string $value) |
||
27 | |||
28 | private function getAllowedValues(): array |
||
36 | |||
37 | public static function scheduled(): Status |
||
41 | |||
42 | public static function postponed(): Status |
||
46 | |||
47 | public static function cancelled(): Status |
||
51 | |||
52 | public function toNative(): string |
||
56 | |||
57 | public static function fromNative(string $value): Status |
||
61 | |||
62 | public function equals(Status $status): bool |
||
66 | } |
||
67 |