1 | <?php |
||
13 | final class Alert extends Component |
||
14 | { |
||
15 | private const TRIGGER_START = 'trigger_start'; |
||
16 | private const TRIGGER_END = 'trigger_end'; |
||
17 | private const TRIGGER_DATE = 'trigger_date'; |
||
18 | |||
19 | /** @var \DateTimeInterface */ |
||
20 | private $triggerDate; |
||
21 | |||
22 | /** @var DateInterval */ |
||
23 | private $triggerInterval; |
||
24 | |||
25 | /** @var string */ |
||
26 | private $triggerMode = self::TRIGGER_DATE; |
||
27 | |||
28 | /** @var null|string */ |
||
29 | private $message; |
||
30 | |||
31 | public static function date(DateTimeInterface $date, string $description = null): Alert |
||
35 | |||
36 | public static function minutesBeforeStart(int $minutes, string $description = null): Alert |
||
43 | |||
44 | public static function minutesAfterStart(int $minutes, string $description = null): Alert |
||
48 | |||
49 | public static function minutesBeforeEnd(int $minutes, string $description = null): Alert |
||
56 | |||
57 | public static function minutesAfterEnd(int $minutes, string $description = null): Alert |
||
61 | |||
62 | private static function create(string $description = null): Alert |
||
66 | |||
67 | public function __construct(string $description = null) |
||
71 | |||
72 | public function getComponentType(): string |
||
76 | |||
77 | public function getRequiredProperties(): array |
||
85 | |||
86 | public function message(string $message): Alert |
||
92 | |||
93 | public function triggerDate(DateTimeInterface $triggerAt): Alert |
||
100 | |||
101 | public function triggerAtStart(DateInterval $interval): Alert |
||
108 | |||
109 | public function triggerAtEnd(DateInterval $interval): Alert |
||
116 | |||
117 | protected function payload(): ComponentPayload |
||
124 | |||
125 | private function resolveTriggerProperty() |
||
143 | } |
||
144 |
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.