1 | <?php |
||
12 | final class Alert extends Component |
||
13 | { |
||
14 | private const TRIGGER_START = 'trigger_start'; |
||
15 | private const TRIGGER_END = 'trigger_end'; |
||
16 | private const TRIGGER_DATE = 'trigger_date'; |
||
17 | |||
18 | /** @var \DateTimeInterface */ |
||
19 | private $triggerDate; |
||
20 | |||
21 | /** @var DateInterval */ |
||
22 | private $triggerInterval; |
||
23 | |||
24 | /** @var string */ |
||
25 | private $triggerMode = self::TRIGGER_DATE; |
||
26 | |||
27 | /** @var null|string */ |
||
28 | private $message; |
||
29 | |||
30 | public static function date(DateTimeInterface $date, string $description = null): Alert |
||
34 | |||
35 | public static function minutesBeforeStart(int $minutes, string $description = null): Alert |
||
42 | |||
43 | public static function minutesAfterStart(int $minutes, string $description = null): Alert |
||
47 | |||
48 | public static function minutesBeforeEnd(int $minutes, string $description = null): Alert |
||
55 | |||
56 | public static function minutesAfterEnd(int $minutes, string $description = null): Alert |
||
60 | |||
61 | private static function create(string $description = null): Alert |
||
65 | |||
66 | public function __construct(string $description = null) |
||
70 | |||
71 | public function getComponentType(): string |
||
75 | |||
76 | public function getRequiredProperties(): array |
||
84 | |||
85 | public function message(string $message): Alert |
||
91 | |||
92 | public function triggerDate(DateTimeInterface $triggerAt): Alert |
||
99 | |||
100 | public function triggerAtStart(DateInterval $interval): Alert |
||
107 | |||
108 | public function triggerAtEnd(DateInterval $interval): Alert |
||
115 | |||
116 | protected function payload(): ComponentPayload |
||
123 | |||
124 | private function resolveTriggerProperty() |
||
142 | } |
||
143 |
Late static binding only has effect in subclasses. A
final
class cannot be extended anymore so late static binding cannot occurr. Consider replacingstatic::
withself::
.To learn more about late static binding, please refer to the PHP core documentation.