ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Observer.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 interface Observer
27 {
31  public function getId(): string;
32 
36  public function update(Event $event, ?Data $data): void;
37 
42  public function updateFailed(\Throwable $e, Event $event, ?Data $data): void;
43 }
getId()
Unique identifier of the implementing event-listener.
updateFailed(\Throwable $e, Event $event, ?Data $data)
Is called if your update method failed (Exception, Throwable).
update(Event $event, ?Data $data)
Recieves an event and handles it appropriately.