aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-10-13 10:47:00 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-10-13 10:47:00 +0200
commit0da89c0fa1609de994a6ba92b67f2d382d27c98e (patch)
tree6be763708c163cee9f1250ebb8956f447dfbb0a0
parent349da3395a2a5e56fc0cdb77ae8e67182842d0bd (diff)
downloadnextcloud-server-0da89c0fa1609de994a6ba92b67f2d382d27c98e.tar.gz
nextcloud-server-0da89c0fa1609de994a6ba92b67f2d382d27c98e.zip
The file cache entry is array accessible
… so let's make this part of our API. We use it as array already. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--lib/private/Files/Cache/CacheEntry.php2
-rw-r--r--lib/public/Files/Cache/ICacheEntry.php8
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/Files/Cache/CacheEntry.php b/lib/private/Files/Cache/CacheEntry.php
index 744b88b5b51..a0ba9020909 100644
--- a/lib/private/Files/Cache/CacheEntry.php
+++ b/lib/private/Files/Cache/CacheEntry.php
@@ -27,7 +27,7 @@ use OCP\Files\Cache\ICacheEntry;
/**
* meta data for a file or folder
*/
-class CacheEntry implements ICacheEntry, \ArrayAccess {
+class CacheEntry implements ICacheEntry {
/**
* @var array
*/
diff --git a/lib/public/Files/Cache/ICacheEntry.php b/lib/public/Files/Cache/ICacheEntry.php
index e3efe679cde..7a0e22496e0 100644
--- a/lib/public/Files/Cache/ICacheEntry.php
+++ b/lib/public/Files/Cache/ICacheEntry.php
@@ -23,12 +23,18 @@
namespace OCP\Files\Cache;
+use ArrayAccess;
+
/**
* meta data for a file or folder
*
* @since 9.0.0
+ *
+ * This interface extends \ArrayAccess since v21.0.0, previous versions only
+ * implemented it in the private implementation. Hence php would allow using the
+ * object as array, while strictly speaking it didn't support this.
*/
-interface ICacheEntry {
+interface ICacheEntry extends ArrayAccess {
public const DIRECTORY_MIMETYPE = 'httpd/unix-directory';
/**