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>
This commit is contained in:
Christoph Wurst 2020-10-13 10:47:00 +02:00
parent 349da3395a
commit 0da89c0fa1
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
2 changed files with 8 additions and 2 deletions

View 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
*/

View File

@ -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';
/**