]> source.dussan.org Git - nextcloud-server.git/commitdiff
The file cache entry is array accessible 23409/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 13 Oct 2020 08:47:00 +0000 (10:47 +0200)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 13 Oct 2020 08:47:00 +0000 (10:47 +0200)
… so let's make this part of our API. We use it as array already.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
lib/private/Files/Cache/CacheEntry.php
lib/public/Files/Cache/ICacheEntry.php

index 744b88b5b51d06c505b516d62a7406801cb2ba6e..a0ba902090948eeb19f438806f607540cd6423d9 100644 (file)
@@ -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
         */
index e3efe679cdead0d2bce05fd3d557ca01ae5d2ce6..7a0e22496e0c859c7eecc3a1b82136dff6fe250a 100644 (file)
 
 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';
 
        /**