diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-03-11 08:51:07 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-03-11 08:51:07 +0100 |
commit | b8ce9c5554463d0ae55e8f981e3d77eb8101315a (patch) | |
tree | b3d83b6d1a08d26e20577069f3b2350b07e4a4ff /lib/public/share | |
parent | 1ed831564e47a35ce41f78cc6a67a95a06ad5f50 (diff) | |
download | nextcloud-server-b8ce9c5554463d0ae55e8f981e3d77eb8101315a.tar.gz nextcloud-server-b8ce9c5554463d0ae55e8f981e3d77eb8101315a.zip |
Use more generic node instead of File/Folder
The phpdoc for the sharing functions was very restrictive. As a
consequence passing node object (for example from the OCS Share API
where we don't really care if it is a file or folder), would actually
be invalid.
With this loser restriction the interfaces become more generic.
Diffstat (limited to 'lib/public/share')
-rw-r--r-- | lib/public/share/imanager.php | 5 | ||||
-rw-r--r-- | lib/public/share/ishareprovider.php | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/public/share/imanager.php b/lib/public/share/imanager.php index edb76c46de4..86a31e1f06d 100644 --- a/lib/public/share/imanager.php +++ b/lib/public/share/imanager.php @@ -21,6 +21,7 @@ namespace OCP\Share; +use OCP\Files\Node; use OCP\IUser; use OCP\Share\Exceptions\ShareNotFound; @@ -91,7 +92,7 @@ interface IManager { * * @param string $userId * @param int $shareType - * @param \OCP\Files\File|\OCP\Files\Folder $path + * @param Node|null $path * @param bool $reshares * @param int $limit The maximum number of returned results, -1 for all results * @param int $offset @@ -106,7 +107,7 @@ interface IManager { * * @param string $userId * @param int $shareType - * @param \OCP\Files\File|\OCP\Files\Folder|null $node + * @param Node|null $node * @param int $limit The maximum number of shares returned, -1 for all * @param int $offset * @return IShare[] diff --git a/lib/public/share/ishareprovider.php b/lib/public/share/ishareprovider.php index b339ce63d34..d00b9da7b59 100644 --- a/lib/public/share/ishareprovider.php +++ b/lib/public/share/ishareprovider.php @@ -21,10 +21,8 @@ namespace OCP\Share; -use OC\Share20\Exception\ShareNotFound; -use OC\Share20\Exception\BackendError; +use OCP\Share\Exceptions\ShareNotFound; use OCP\Files\Node; -use OCP\IUser; /** * Interface IShareProvider @@ -97,7 +95,7 @@ interface IShareProvider { * * @param string $userId * @param int $shareType - * @param \OCP\Files\File|\OCP\Files\Folder $node + * @param Node|null $node * @param bool $reshares Also get the shares where $user is the owner instead of just the shares where $user is the initiator * @param int $limit The maximum number of shares to be returned, -1 for all shares * @param int $offset @@ -120,11 +118,11 @@ interface IShareProvider { /** * Get shares for a given path * - * @param \OCP\Files\Node $path + * @param Node $path * @return \OCP\Share\IShare[] * @since 9.0.0 */ - public function getSharesByPath(\OCP\Files\Node $path); + public function getSharesByPath(Node $path); /** * Get shared with the given user |