ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\ResourceStorage\IRSSEventLogObserver Class Reference
+ Inheritance diagram for ILIAS\ResourceStorage\IRSSEventLogObserver:
+ Collaboration diagram for ILIAS\ResourceStorage\IRSSEventLogObserver:

Public Member Functions

 __construct (private \ilLogger $logger)
 
 getId ()
 Unique identifier of the implementing event-listener. More...
 
 update (Event $event, ?Data $data)
 
 updateFailed (\Throwable $e, Event $event, ?Data $data)
 
- Public Member Functions inherited from ILIAS\ResourceStorage\Events\Observer
 getId ()
 Unique identifier of the implementing event-listener. More...
 
 update (Event $event, ?Data $data)
 Recieves an event and handles it appropriately. More...
 
 updateFailed (\Throwable $e, Event $event, ?Data $data)
 Is called if your update method failed (Exception, Throwable). More...
 

Private Member Functions

 appendData (string $to_message, ?Data $data=null)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ResourceStorage\IRSSEventLogObserver::__construct ( private \ilLogger  $logger)

Definition at line 30 of file IRSSEventLogObserver.php.

31 {
32 }

Member Function Documentation

◆ appendData()

ILIAS\ResourceStorage\IRSSEventLogObserver::appendData ( string  $to_message,
?Data  $data = null 
)
private

Definition at line 39 of file IRSSEventLogObserver.php.

39 : string
40 {
41 return $to_message . ': ' . ($data ? json_encode($data->getArrayCopy()) : '');
42 }

References $data.

Referenced by ILIAS\ResourceStorage\IRSSEventLogObserver\update().

+ Here is the caller graph for this function:

◆ getId()

ILIAS\ResourceStorage\IRSSEventLogObserver::getId ( )

Unique identifier of the implementing event-listener.

e.g. FQCN

Implements ILIAS\ResourceStorage\Events\Observer.

Definition at line 34 of file IRSSEventLogObserver.php.

34 : string
35 {
36 return self::class;
37 }

◆ update()

ILIAS\ResourceStorage\IRSSEventLogObserver::update ( Event  $event,
?Data  $data 
)

Definition at line 45 of file IRSSEventLogObserver.php.

45 : void
46 {
47 match ($event->value) {
48 Event::COLLECTION_RESOURCE_ADDED => $this->logger->info($this->appendData("Collection resource added", $data)),
49 Event::FLAVOUR_BUILD_SUCCESS => $this->logger->info($this->appendData("Flavour build success", $data)),
50 Event::FLAVOUR_BUILD_FAILED => $this->logger->warning($this->appendData("Flavour build failed", $data)),
51 default => $this->logger->debug($this->appendData($event->value, $data))
52 };
53 }
appendData(string $to_message, ?Data $data=null)
@ FLAVOUR_BUILD_FAILED
event string being used if a new Resource has been stored to the IRSS.
Definition: Event.php:52

References $data, ILIAS\ResourceStorage\IRSSEventLogObserver\appendData(), ILIAS\ResourceStorage\Events\FLAVOUR_BUILD_FAILED, and ILIAS\Repository\logger().

+ Here is the call graph for this function:

◆ updateFailed()

ILIAS\ResourceStorage\IRSSEventLogObserver::updateFailed ( \Throwable  $e,
Event  $event,
?Data  $data 
)

Definition at line 55 of file IRSSEventLogObserver.php.

55 : void
56 {
57 // nothing to do
58 }

The documentation for this class was generated from the following file: