ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
IRSSEventLogObserver.php
Go to the documentation of this file.
1
<?php
2
19
namespace
ILIAS\ResourceStorage
;
20
21
use
ILIAS\ResourceStorage\Events\Observer
;
22
use
ILIAS\ResourceStorage\Events\Event
;
23
use
ILIAS\ResourceStorage\Events\Data
;
24
28
class
IRSSEventLogObserver
implements
Observer
29
{
30
public
function
__construct
(
private
\
ilLogger
$logger)
31
{
32
}
33
34
public
function
getId
(): string
35
{
36
return
self::class;
37
}
38
39
private
function
appendData
(
string
$to_message, ?
Data
$data
=
null
): string
40
{
41
return
$to_message .
': '
. (
$data
? json_encode(
$data
->getArrayCopy()) :
''
);
42
}
43
44
45
public
function
update
(
Event
$event, ?
Data
$data
): 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
}
54
55
public
function
updateFailed
(\
Throwable
$e
,
Event
$event, ?
Data
$data
): void
56
{
57
// nothing to do
58
}
59
60
}
ilLogger
ILIAS\ResourceStorage\IRSSEventLogObserver\getId
getId()
Unique identifier of the implementing event-listener.
Definition:
IRSSEventLogObserver.php:34
$data
$data
Definition:
ltiregistration.php:29
Data
ILIAS\ResourceStorage\IRSSEventLogObserver\updateFailed
updateFailed(\Throwable $e, Event $event, ?Data $data)
Definition:
IRSSEventLogObserver.php:55
ILIAS\ResourceStorage\Events\Observer
Definition:
Observer.php:26
Vendor\Package\$e
$e
Definition:
example_cleaned.php:49
ILIAS\ResourceStorage\IRSSEventLogObserver\appendData
appendData(string $to_message, ?Data $data=null)
Definition:
IRSSEventLogObserver.php:39
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:144
ILIAS\ResourceStorage
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Observer
ILIAS\ResourceStorage\IRSSEventLogObserver\update
update(Event $event, ?Data $data)
Definition:
IRSSEventLogObserver.php:45
ILIAS\ResourceStorage\Events\FLAVOUR_BUILD_FAILED
event string being used if a new Resource has been stored to the IRSS.
Definition:
Event.php:52
Data
ILIAS\Repository\logger
logger()
Definition:
trait.GlobalDICDomainServices.php:71
ILIAS\ResourceStorage\Events\Event
Event
Definition:
Event.php:26
ILIAS\ResourceStorage\IRSSEventLogObserver\__construct
__construct(private \ilLogger $logger)
Definition:
IRSSEventLogObserver.php:30
ILIAS\ResourceStorage\IRSSEventLogObserver
Definition:
IRSSEventLogObserver.php:28
Throwable
components
ILIAS
ResourceStorage
classes
IRSSEventLogObserver.php
Generated on Sun Aug 31 2025 23:03:36 for ILIAS by
1.8.13 (using
Doxyfile
)