1 | <?php |
||
20 | final class PushType |
||
21 | { |
||
22 | const TYPE_ALERT = 'alert'; |
||
23 | const TYPE_BACKGROUND = 'background'; |
||
24 | |||
25 | private $value; |
||
26 | |||
27 | /** |
||
28 | * Create alert push-type |
||
29 | * |
||
30 | * @return PushType |
||
31 | */ |
||
32 | public static function alert(): PushType |
||
36 | |||
37 | /** |
||
38 | * Create background push-type |
||
39 | * |
||
40 | * @return PushType |
||
41 | */ |
||
42 | public static function background(): PushType |
||
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | */ |
||
50 | public function __toString(): string |
||
54 | |||
55 | /** |
||
56 | * @param string $type |
||
57 | * |
||
58 | * @throws \InvalidArgumentException |
||
59 | */ |
||
60 | private function __construct(string $type) |
||
75 | } |
||
76 |