From 23fb497ff59a90813cba24ca1c82be979cf95046 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 13 Nov 2020 17:04:36 +0100 Subject: extend cache events - adds cache remove event - expose storage id in event - emit events during cache move Signed-off-by: Robin Appelman --- lib/private/Files/Cache/AbstractCacheEvent.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/private/Files/Cache/AbstractCacheEvent.php') diff --git a/lib/private/Files/Cache/AbstractCacheEvent.php b/lib/private/Files/Cache/AbstractCacheEvent.php index a4029476fa5..bb7ade386e0 100644 --- a/lib/private/Files/Cache/AbstractCacheEvent.php +++ b/lib/private/Files/Cache/AbstractCacheEvent.php @@ -36,6 +36,7 @@ class AbstractCacheEvent extends Event implements ICacheEvent { protected $storage; protected $path; protected $fileId; + protected $storageId; /** * @param IStorage $storage @@ -43,10 +44,11 @@ class AbstractCacheEvent extends Event implements ICacheEvent { * @param int $fileId * @since 16.0.0 */ - public function __construct(IStorage $storage, string $path, int $fileId) { + public function __construct(IStorage $storage, string $path, int $fileId, int $storageId) { $this->storage = $storage; $this->path = $path; $this->fileId = $fileId; + $this->storageId = $storageId; } /** @@ -80,4 +82,12 @@ class AbstractCacheEvent extends Event implements ICacheEvent { public function getFileId(): int { return $this->fileId; } + + /** + * @return int + * @since 21.0.0 + */ + public function getStorageId(): int { + return $this->storageId; + } } -- cgit v1.2.3