diff options
author | Robin Appelman <robin@icewind.nl> | 2020-11-13 17:04:36 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-11-26 15:22:03 +0100 |
commit | 23fb497ff59a90813cba24ca1c82be979cf95046 (patch) | |
tree | 2c56eb189e025d098f7c89539416936014ae9522 /lib/private/Files/Cache/AbstractCacheEvent.php | |
parent | 54e3beba165739c480730f797e2b386b12a92713 (diff) | |
download | nextcloud-server-23fb497ff59a90813cba24ca1c82be979cf95046.tar.gz nextcloud-server-23fb497ff59a90813cba24ca1c82be979cf95046.zip |
extend cache events
- adds cache remove event
- expose storage id in event
- emit events during cache move
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Cache/AbstractCacheEvent.php')
-rw-r--r-- | lib/private/Files/Cache/AbstractCacheEvent.php | 12 |
1 files changed, 11 insertions, 1 deletions
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; + } } |