From dc050fb5e5b1ce294553c8905f409e03dca1b1aa Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 13 Feb 2020 08:38:33 +0100 Subject: [PATCH] Allow to overwrite the path on the cache event Signed-off-by: Joas Schilling --- lib/private/Files/Cache/AbstractCacheEvent.php | 8 ++++++++ lib/public/Files/Cache/ICacheEvent.php | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/lib/private/Files/Cache/AbstractCacheEvent.php b/lib/private/Files/Cache/AbstractCacheEvent.php index 0fd0377900..741c06f349 100644 --- a/lib/private/Files/Cache/AbstractCacheEvent.php +++ b/lib/private/Files/Cache/AbstractCacheEvent.php @@ -64,6 +64,14 @@ class AbstractCacheEvent extends Event implements ICacheEvent { return $this->path; } + /** + * @param string $path + * @since 19.0.0 + */ + public function setPath(string $path): void { + $this->path = $path; + } + /** * @return int * @since 16.0.0 diff --git a/lib/public/Files/Cache/ICacheEvent.php b/lib/public/Files/Cache/ICacheEvent.php index c075d65564..54ef15b039 100644 --- a/lib/public/Files/Cache/ICacheEvent.php +++ b/lib/public/Files/Cache/ICacheEvent.php @@ -44,6 +44,12 @@ interface ICacheEvent { */ public function getPath(): string; + /** + * @param string $path + * @since 19.0.0 + */ + public function setPath(string $path): void; + /** * @return int * @since 16.0.0