ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Observer.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26interface 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.
update(Event $event, ?Data $data)
Recieves an event and handles it appropriately.
updateFailed(\Throwable $e, Event $event, ?Data $data)
Is called if your update method failed (Exception, Throwable).