summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
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 /apps/files_sharing
parent5d0451b84862c2c905b7d1a8d5943ac53d87f990 (diff)
downloadnextcloud-server-6d321f5f6b4e22f0c8124572662361a1f53e7c3a.tar.gz
nextcloud-server-6d321f5f6b4e22f0c8124572662361a1f53e7c3a.zip
Return a class from cache operations instead of an array
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/cache.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index 714cc144c0b..10d1e787922 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -33,6 +33,7 @@
namespace OC\Files\Cache;
use OC\User\NoUserException;
+use OCP\Files\Cache\ICacheEntry;
use OCP\Share_Backend_Collection;
/**
@@ -98,8 +99,8 @@ class Shared_Cache extends Cache {
/**
* get the stored metadata of a file or folder
*
- * @param string $file
- * @return array|false
+ * @param string|int $file
+ * @return ICacheEntry|false
*/
public function get($file) {
$mimetypeLoader = \OC::$server->getMimeTypeLoader();
@@ -161,7 +162,7 @@ class Shared_Cache extends Cache {
* get the metadata of all files stored in $folder
*
* @param string $folderId
- * @return array|false
+ * @return ICacheEntry[]|false
*/
public function getFolderContentsById($folderId) {
$cache = $this->getSourceCache('');
@@ -281,7 +282,7 @@ class Shared_Cache extends Cache {
* search for files matching $pattern
*
* @param string $pattern
- * @return array of file data
+ * @return ICacheEntry[] of file data
*/
public function search($pattern) {
@@ -320,7 +321,7 @@ class Shared_Cache extends Cache {
* search for files by mimetype
*
* @param string $mimetype
- * @return array
+ * @return ICacheEntry[]
*/
public function searchByMime($mimetype) {
$mimepart = null;
@@ -373,7 +374,7 @@ class Shared_Cache extends Cache {
*
* @param string|int $tag tag to search for
* @param string $userId owner of the tags
- * @return array file data
+ * @return ICacheEntry[] file data
*/
public function searchByTag($tag, $userId) {
// TODO: inject this