Total Complexity | 4 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
18 | class CacheEventListener implements CacheEventListenerInterface |
||
19 | { |
||
20 | private $logger; |
||
21 | |||
22 | public function __construct($logger) |
||
25 | } |
||
26 | |||
27 | public function onDelete($key, $entry) |
||
28 | { |
||
29 | $logEntry = new LogEntry( |
||
30 | new DateTimeImmutable(date('Y-m-d H:i:s'), new DateTimeZone('UTC')), |
||
31 | LogEntry::SEVERITY_INFO, |
||
32 | 'Cache Entry with key '.$key.' deleted' |
||
33 | ); |
||
34 | |||
35 | $this->logger->log($logEntry); |
||
36 | |||
37 | return $entry; |
||
38 | } |
||
39 | |||
40 | public function onGet($key, $entry) |
||
51 | } |
||
52 | |||
53 | public function onSet($key, $entry) |
||
64 | } |
||
65 | } |
||
66 |