summaryrefslogtreecommitdiffstats
path: root/lib/private/files/cache/wrapper
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-12-02 14:59:13 +0100
committerRobin Appelman <icewind@owncloud.com>2016-01-14 12:54:42 +0100
commit6d321f5f6b4e22f0c8124572662361a1f53e7c3a (patch)
treeaeea16e4d4174e6491a7de9ad0d207a3cd83c927 /lib/private/files/cache/wrapper
parent5d0451b84862c2c905b7d1a8d5943ac53d87f990 (diff)
downloadnextcloud-server-6d321f5f6b4e22f0c8124572662361a1f53e7c3a.tar.gz
nextcloud-server-6d321f5f6b4e22f0c8124572662361a1f53e7c3a.zip
Return a class from cache operations instead of an array
Diffstat (limited to 'lib/private/files/cache/wrapper')
-rw-r--r--lib/private/files/cache/wrapper/cachewrapper.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/private/files/cache/wrapper/cachewrapper.php b/lib/private/files/cache/wrapper/cachewrapper.php
index f401b7482eb..39a6b63205b 100644
--- a/lib/private/files/cache/wrapper/cachewrapper.php
+++ b/lib/private/files/cache/wrapper/cachewrapper.php
@@ -25,6 +25,7 @@
namespace OC\Files\Cache\Wrapper;
use OC\Files\Cache\Cache;
+use OCP\Files\Cache\ICacheEntry;
class CacheWrapper extends Cache {
/**
@@ -42,8 +43,8 @@ class CacheWrapper extends Cache {
/**
* Make it easy for wrappers to modify every returned cache entry
*
- * @param array $entry
- * @return array
+ * @param ICacheEntry $entry
+ * @return ICacheEntry
*/
protected function formatCacheEntry($entry) {
return $entry;
@@ -53,7 +54,7 @@ class CacheWrapper extends Cache {
* get the stored metadata of a file or folder
*
* @param string /int $file
- * @return array|false
+ * @return ICacheEntry|false
*/
public function get($file) {
$result = $this->cache->get($file);
@@ -67,7 +68,7 @@ class CacheWrapper extends Cache {
* get the metadata of all files stored in $folder
*
* @param string $folder
- * @return array
+ * @return ICacheEntry[]
*/
public function getFolderContents($folder) {
// cant do a simple $this->cache->.... call here since getFolderContentsById needs to be called on this
@@ -178,7 +179,7 @@ class CacheWrapper extends Cache {
* search for files matching $pattern
*
* @param string $pattern
- * @return array an array of file data
+ * @return ICacheEntry[] an array of file data
*/
public function search($pattern) {
$results = $this->cache->search($pattern);
@@ -189,7 +190,7 @@ class CacheWrapper extends Cache {
* search for files by mimetype
*
* @param string $mimetype
- * @return array
+ * @return ICacheEntry[]
*/
public function searchByMime($mimetype) {
$results = $this->cache->searchByMime($mimetype);
@@ -201,7 +202,7 @@ class CacheWrapper extends Cache {
*
* @param string|int $tag name or tag id
* @param string $userId owner of the tags
- * @return array file data
+ * @return ICacheEntry[] file data
*/
public function searchByTag($tag, $userId) {
$results = $this->cache->searchByTag($tag, $userId);