@@ -30,13 +30,13 @@ |
||
30 | 30 | */ |
31 | 31 | class SabrePluginException extends Exception { |
32 | 32 | |
33 | - /** |
|
34 | - * Returns the HTTP statuscode for this exception |
|
35 | - * |
|
36 | - * @return int |
|
37 | - * @since 8.2.0 |
|
38 | - */ |
|
39 | - public function getHTTPCode() { |
|
40 | - return $this->code; |
|
41 | - } |
|
33 | + /** |
|
34 | + * Returns the HTTP statuscode for this exception |
|
35 | + * |
|
36 | + * @return int |
|
37 | + * @since 8.2.0 |
|
38 | + */ |
|
39 | + public function getHTTPCode() { |
|
40 | + return $this->code; |
|
41 | + } |
|
42 | 42 | } |
@@ -33,65 +33,65 @@ |
||
33 | 33 | */ |
34 | 34 | interface Share_Backend { |
35 | 35 | |
36 | - /** |
|
37 | - * Check if this $itemSource exist for the user |
|
38 | - * @param string $itemSource |
|
39 | - * @param string $uidOwner Owner of the item |
|
40 | - * @return boolean|null Source |
|
41 | - * |
|
42 | - * Return false if the item does not exist for the user |
|
43 | - * @since 5.0.0 |
|
44 | - */ |
|
45 | - public function isValidSource($itemSource, $uidOwner); |
|
36 | + /** |
|
37 | + * Check if this $itemSource exist for the user |
|
38 | + * @param string $itemSource |
|
39 | + * @param string $uidOwner Owner of the item |
|
40 | + * @return boolean|null Source |
|
41 | + * |
|
42 | + * Return false if the item does not exist for the user |
|
43 | + * @since 5.0.0 |
|
44 | + */ |
|
45 | + public function isValidSource($itemSource, $uidOwner); |
|
46 | 46 | |
47 | - /** |
|
48 | - * Get a unique name of the item for the specified user |
|
49 | - * @param string $itemSource |
|
50 | - * @param string|false $shareWith User the item is being shared with |
|
51 | - * @param array|null $exclude List of similar item names already existing as shared items @deprecated since version OC7 |
|
52 | - * @return string Target name |
|
53 | - * |
|
54 | - * This function needs to verify that the user does not already have an item with this name. |
|
55 | - * If it does generate a new name e.g. name_# |
|
56 | - * @since 5.0.0 |
|
57 | - */ |
|
58 | - public function generateTarget($itemSource, $shareWith, $exclude = null); |
|
47 | + /** |
|
48 | + * Get a unique name of the item for the specified user |
|
49 | + * @param string $itemSource |
|
50 | + * @param string|false $shareWith User the item is being shared with |
|
51 | + * @param array|null $exclude List of similar item names already existing as shared items @deprecated since version OC7 |
|
52 | + * @return string Target name |
|
53 | + * |
|
54 | + * This function needs to verify that the user does not already have an item with this name. |
|
55 | + * If it does generate a new name e.g. name_# |
|
56 | + * @since 5.0.0 |
|
57 | + */ |
|
58 | + public function generateTarget($itemSource, $shareWith, $exclude = null); |
|
59 | 59 | |
60 | - /** |
|
61 | - * Converts the shared item sources back into the item in the specified format |
|
62 | - * @param array $items Shared items |
|
63 | - * @param int $format |
|
64 | - * @return array |
|
65 | - * |
|
66 | - * The items array is a 3-dimensional array with the item_source as the |
|
67 | - * first key and the share id as the second key to an array with the share |
|
68 | - * info. |
|
69 | - * |
|
70 | - * The key/value pairs included in the share info depend on the function originally called: |
|
71 | - * If called by getItem(s)Shared: id, item_type, item, item_source, |
|
72 | - * share_type, share_with, permissions, stime, file_source |
|
73 | - * |
|
74 | - * If called by getItem(s)SharedWith: id, item_type, item, item_source, |
|
75 | - * item_target, share_type, share_with, permissions, stime, file_source, |
|
76 | - * file_target |
|
77 | - * |
|
78 | - * This function allows the backend to control the output of shared items with custom formats. |
|
79 | - * It is only called through calls to the public getItem(s)Shared(With) functions. |
|
80 | - * @since 5.0.0 |
|
81 | - */ |
|
82 | - public function formatItems($items, $format, $parameters = null); |
|
60 | + /** |
|
61 | + * Converts the shared item sources back into the item in the specified format |
|
62 | + * @param array $items Shared items |
|
63 | + * @param int $format |
|
64 | + * @return array |
|
65 | + * |
|
66 | + * The items array is a 3-dimensional array with the item_source as the |
|
67 | + * first key and the share id as the second key to an array with the share |
|
68 | + * info. |
|
69 | + * |
|
70 | + * The key/value pairs included in the share info depend on the function originally called: |
|
71 | + * If called by getItem(s)Shared: id, item_type, item, item_source, |
|
72 | + * share_type, share_with, permissions, stime, file_source |
|
73 | + * |
|
74 | + * If called by getItem(s)SharedWith: id, item_type, item, item_source, |
|
75 | + * item_target, share_type, share_with, permissions, stime, file_source, |
|
76 | + * file_target |
|
77 | + * |
|
78 | + * This function allows the backend to control the output of shared items with custom formats. |
|
79 | + * It is only called through calls to the public getItem(s)Shared(With) functions. |
|
80 | + * @since 5.0.0 |
|
81 | + */ |
|
82 | + public function formatItems($items, $format, $parameters = null); |
|
83 | 83 | |
84 | - /** |
|
85 | - * Check if a given share type is allowd by the back-end |
|
86 | - * |
|
87 | - * @param int $shareType share type |
|
88 | - * @return boolean |
|
89 | - * |
|
90 | - * The back-end can enable/disable specific share types. Just return true if |
|
91 | - * the back-end doesn't provide any specific settings for it and want to allow |
|
92 | - * all share types defined by the share API |
|
93 | - * @since 8.0.0 |
|
94 | - */ |
|
95 | - public function isShareTypeAllowed($shareType); |
|
84 | + /** |
|
85 | + * Check if a given share type is allowd by the back-end |
|
86 | + * |
|
87 | + * @param int $shareType share type |
|
88 | + * @return boolean |
|
89 | + * |
|
90 | + * The back-end can enable/disable specific share types. Just return true if |
|
91 | + * the back-end doesn't provide any specific settings for it and want to allow |
|
92 | + * all share types defined by the share API |
|
93 | + * @since 8.0.0 |
|
94 | + */ |
|
95 | + public function isShareTypeAllowed($shareType); |
|
96 | 96 | |
97 | 97 | } |
@@ -31,13 +31,13 @@ |
||
31 | 31 | * @since 8.0.0 |
32 | 32 | */ |
33 | 33 | interface IMountProvider { |
34 | - /** |
|
35 | - * Get all mountpoints applicable for the user |
|
36 | - * |
|
37 | - * @param \OCP\IUser $user |
|
38 | - * @param \OCP\Files\Storage\IStorageFactory $loader |
|
39 | - * @return \OCP\Files\Mount\IMountPoint[] |
|
40 | - * @since 8.0.0 |
|
41 | - */ |
|
42 | - public function getMountsForUser(IUser $user, IStorageFactory $loader); |
|
34 | + /** |
|
35 | + * Get all mountpoints applicable for the user |
|
36 | + * |
|
37 | + * @param \OCP\IUser $user |
|
38 | + * @param \OCP\Files\Storage\IStorageFactory $loader |
|
39 | + * @return \OCP\Files\Mount\IMountPoint[] |
|
40 | + * @since 8.0.0 |
|
41 | + */ |
|
42 | + public function getMountsForUser(IUser $user, IStorageFactory $loader); |
|
43 | 43 | } |
@@ -31,13 +31,13 @@ |
||
31 | 31 | * @since 9.1.0 |
32 | 32 | */ |
33 | 33 | interface IHomeMountProvider { |
34 | - /** |
|
35 | - * Get all mountpoints applicable for the user |
|
36 | - * |
|
37 | - * @param \OCP\IUser $user |
|
38 | - * @param \OCP\Files\Storage\IStorageFactory $loader |
|
39 | - * @return \OCP\Files\Mount\IMountPoint|null |
|
40 | - * @since 9.1.0 |
|
41 | - */ |
|
42 | - public function getHomeMountForUser(IUser $user, IStorageFactory $loader); |
|
34 | + /** |
|
35 | + * Get all mountpoints applicable for the user |
|
36 | + * |
|
37 | + * @param \OCP\IUser $user |
|
38 | + * @param \OCP\Files\Storage\IStorageFactory $loader |
|
39 | + * @return \OCP\Files\Mount\IMountPoint|null |
|
40 | + * @since 9.1.0 |
|
41 | + */ |
|
42 | + public function getHomeMountForUser(IUser $user, IStorageFactory $loader); |
|
43 | 43 | } |
@@ -31,37 +31,37 @@ |
||
31 | 31 | **/ |
32 | 32 | interface IMimeTypeLoader { |
33 | 33 | |
34 | - /** |
|
35 | - * Get a mimetype from its ID |
|
36 | - * |
|
37 | - * @param int $id |
|
38 | - * @return string|null |
|
39 | - * @since 8.2.0 |
|
40 | - */ |
|
41 | - public function getMimetypeById($id); |
|
34 | + /** |
|
35 | + * Get a mimetype from its ID |
|
36 | + * |
|
37 | + * @param int $id |
|
38 | + * @return string|null |
|
39 | + * @since 8.2.0 |
|
40 | + */ |
|
41 | + public function getMimetypeById($id); |
|
42 | 42 | |
43 | - /** |
|
44 | - * Get a mimetype ID, adding the mimetype to the DB if it does not exist |
|
45 | - * |
|
46 | - * @param string $mimetype |
|
47 | - * @return int |
|
48 | - * @since 8.2.0 |
|
49 | - */ |
|
50 | - public function getId($mimetype); |
|
43 | + /** |
|
44 | + * Get a mimetype ID, adding the mimetype to the DB if it does not exist |
|
45 | + * |
|
46 | + * @param string $mimetype |
|
47 | + * @return int |
|
48 | + * @since 8.2.0 |
|
49 | + */ |
|
50 | + public function getId($mimetype); |
|
51 | 51 | |
52 | - /** |
|
53 | - * Test if a mimetype exists in the database |
|
54 | - * |
|
55 | - * @param string $mimetype |
|
56 | - * @return bool |
|
57 | - * @since 8.2.0 |
|
58 | - */ |
|
59 | - public function exists($mimetype); |
|
52 | + /** |
|
53 | + * Test if a mimetype exists in the database |
|
54 | + * |
|
55 | + * @param string $mimetype |
|
56 | + * @return bool |
|
57 | + * @since 8.2.0 |
|
58 | + */ |
|
59 | + public function exists($mimetype); |
|
60 | 60 | |
61 | - /** |
|
62 | - * Clear all loaded mimetypes, allow for re-loading |
|
63 | - * |
|
64 | - * @since 8.2.0 |
|
65 | - */ |
|
66 | - public function reset(); |
|
61 | + /** |
|
62 | + * Clear all loaded mimetypes, allow for re-loading |
|
63 | + * |
|
64 | + * @since 8.2.0 |
|
65 | + */ |
|
66 | + public function reset(); |
|
67 | 67 | } |
@@ -57,6 +57,6 @@ |
||
57 | 57 | * @since 7.0.0 |
58 | 58 | */ |
59 | 59 | public function __toString() { |
60 | - return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; |
|
60 | + return __CLASS__.": [{$this->code}]: {$this->message}\n"; |
|
61 | 61 | } |
62 | 62 | } |
@@ -36,27 +36,27 @@ |
||
36 | 36 | * @since 7.0.0 |
37 | 37 | */ |
38 | 38 | class LockNotAcquiredException extends \Exception { |
39 | - /** @var string $path The path that could not be locked */ |
|
40 | - public $path; |
|
39 | + /** @var string $path The path that could not be locked */ |
|
40 | + public $path; |
|
41 | 41 | |
42 | - /** @var integer $lockType The type of the lock that was attempted */ |
|
43 | - public $lockType; |
|
42 | + /** @var integer $lockType The type of the lock that was attempted */ |
|
43 | + public $lockType; |
|
44 | 44 | |
45 | - /** |
|
46 | - * @since 7.0.0 |
|
47 | - */ |
|
48 | - public function __construct($path, $lockType, $code = 0, \Exception $previous = null) { |
|
49 | - $message = \OC::$server->getL10N('core')->t('Could not obtain lock type %d on "%s".', [$lockType, $path]); |
|
50 | - parent::__construct($message, $code, $previous); |
|
51 | - } |
|
45 | + /** |
|
46 | + * @since 7.0.0 |
|
47 | + */ |
|
48 | + public function __construct($path, $lockType, $code = 0, \Exception $previous = null) { |
|
49 | + $message = \OC::$server->getL10N('core')->t('Could not obtain lock type %d on "%s".', [$lockType, $path]); |
|
50 | + parent::__construct($message, $code, $previous); |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * custom string representation of object |
|
55 | - * |
|
56 | - * @return string |
|
57 | - * @since 7.0.0 |
|
58 | - */ |
|
59 | - public function __toString() { |
|
60 | - return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; |
|
61 | - } |
|
53 | + /** |
|
54 | + * custom string representation of object |
|
55 | + * |
|
56 | + * @return string |
|
57 | + * @since 7.0.0 |
|
58 | + */ |
|
59 | + public function __toString() { |
|
60 | + return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; |
|
61 | + } |
|
62 | 62 | } |
@@ -30,25 +30,25 @@ |
||
30 | 30 | * @since 8.0.0 |
31 | 31 | */ |
32 | 32 | interface IStorageFactory { |
33 | - /** |
|
34 | - * allow modifier storage behaviour by adding wrappers around storages |
|
35 | - * |
|
36 | - * $callback should be a function of type (string $mountPoint, Storage $storage) => Storage |
|
37 | - * |
|
38 | - * @param string $wrapperName |
|
39 | - * @param callable $callback |
|
40 | - * @return bool true if the wrapper was added, false if there was already a wrapper with this |
|
41 | - * name registered |
|
42 | - * @since 8.0.0 |
|
43 | - */ |
|
44 | - public function addStorageWrapper($wrapperName, $callback); |
|
33 | + /** |
|
34 | + * allow modifier storage behaviour by adding wrappers around storages |
|
35 | + * |
|
36 | + * $callback should be a function of type (string $mountPoint, Storage $storage) => Storage |
|
37 | + * |
|
38 | + * @param string $wrapperName |
|
39 | + * @param callable $callback |
|
40 | + * @return bool true if the wrapper was added, false if there was already a wrapper with this |
|
41 | + * name registered |
|
42 | + * @since 8.0.0 |
|
43 | + */ |
|
44 | + public function addStorageWrapper($wrapperName, $callback); |
|
45 | 45 | |
46 | - /** |
|
47 | - * @param \OCP\Files\Mount\IMountPoint $mountPoint |
|
48 | - * @param string $class |
|
49 | - * @param array $arguments |
|
50 | - * @return \OCP\Files\Storage |
|
51 | - * @since 8.0.0 |
|
52 | - */ |
|
53 | - public function getInstance(IMountPoint $mountPoint, $class, $arguments); |
|
46 | + /** |
|
47 | + * @param \OCP\Files\Mount\IMountPoint $mountPoint |
|
48 | + * @param string $class |
|
49 | + * @param array $arguments |
|
50 | + * @return \OCP\Files\Storage |
|
51 | + * @since 8.0.0 |
|
52 | + */ |
|
53 | + public function getInstance(IMountPoint $mountPoint, $class, $arguments); |
|
54 | 54 | } |
@@ -33,30 +33,30 @@ |
||
33 | 33 | * @since 9.0.0 |
34 | 34 | */ |
35 | 35 | interface ILockingStorage { |
36 | - /** |
|
37 | - * @param string $path The path of the file to acquire the lock for |
|
38 | - * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
39 | - * @param \OCP\Lock\ILockingProvider $provider |
|
40 | - * @throws \OCP\Lock\LockedException |
|
41 | - * @since 9.0.0 |
|
42 | - */ |
|
43 | - public function acquireLock($path, $type, ILockingProvider $provider); |
|
36 | + /** |
|
37 | + * @param string $path The path of the file to acquire the lock for |
|
38 | + * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
39 | + * @param \OCP\Lock\ILockingProvider $provider |
|
40 | + * @throws \OCP\Lock\LockedException |
|
41 | + * @since 9.0.0 |
|
42 | + */ |
|
43 | + public function acquireLock($path, $type, ILockingProvider $provider); |
|
44 | 44 | |
45 | - /** |
|
46 | - * @param string $path The path of the file to acquire the lock for |
|
47 | - * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
48 | - * @param \OCP\Lock\ILockingProvider $provider |
|
49 | - * @throws \OCP\Lock\LockedException |
|
50 | - * @since 9.0.0 |
|
51 | - */ |
|
52 | - public function releaseLock($path, $type, ILockingProvider $provider); |
|
45 | + /** |
|
46 | + * @param string $path The path of the file to acquire the lock for |
|
47 | + * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
48 | + * @param \OCP\Lock\ILockingProvider $provider |
|
49 | + * @throws \OCP\Lock\LockedException |
|
50 | + * @since 9.0.0 |
|
51 | + */ |
|
52 | + public function releaseLock($path, $type, ILockingProvider $provider); |
|
53 | 53 | |
54 | - /** |
|
55 | - * @param string $path The path of the file to change the lock for |
|
56 | - * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
57 | - * @param \OCP\Lock\ILockingProvider $provider |
|
58 | - * @throws \OCP\Lock\LockedException |
|
59 | - * @since 9.0.0 |
|
60 | - */ |
|
61 | - public function changeLock($path, $type, ILockingProvider $provider); |
|
54 | + /** |
|
55 | + * @param string $path The path of the file to change the lock for |
|
56 | + * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
57 | + * @param \OCP\Lock\ILockingProvider $provider |
|
58 | + * @throws \OCP\Lock\LockedException |
|
59 | + * @since 9.0.0 |
|
60 | + */ |
|
61 | + public function changeLock($path, $type, ILockingProvider $provider); |
|
62 | 62 | } |
@@ -30,35 +30,35 @@ |
||
30 | 30 | * @since 12.0.0 |
31 | 31 | */ |
32 | 32 | interface INotifyHandler { |
33 | - /** |
|
34 | - * Start listening for update notifications |
|
35 | - * |
|
36 | - * The provided callback will be called for every incoming notification with the following parameters |
|
37 | - * - IChange|IRenameChange $change |
|
38 | - * |
|
39 | - * Note that this call is blocking and will not exit on it's own, to stop listening for notifications return `false` from the callback |
|
40 | - * |
|
41 | - * @param callable $callback |
|
42 | - * |
|
43 | - * @since 12.0.0 |
|
44 | - */ |
|
45 | - public function listen(callable $callback); |
|
33 | + /** |
|
34 | + * Start listening for update notifications |
|
35 | + * |
|
36 | + * The provided callback will be called for every incoming notification with the following parameters |
|
37 | + * - IChange|IRenameChange $change |
|
38 | + * |
|
39 | + * Note that this call is blocking and will not exit on it's own, to stop listening for notifications return `false` from the callback |
|
40 | + * |
|
41 | + * @param callable $callback |
|
42 | + * |
|
43 | + * @since 12.0.0 |
|
44 | + */ |
|
45 | + public function listen(callable $callback); |
|
46 | 46 | |
47 | - /** |
|
48 | - * Get all changes detected since the start of the notify process or the last call to getChanges |
|
49 | - * |
|
50 | - * @return IChange[] |
|
51 | - * |
|
52 | - * @since 12.0.0 |
|
53 | - */ |
|
54 | - public function getChanges(); |
|
47 | + /** |
|
48 | + * Get all changes detected since the start of the notify process or the last call to getChanges |
|
49 | + * |
|
50 | + * @return IChange[] |
|
51 | + * |
|
52 | + * @since 12.0.0 |
|
53 | + */ |
|
54 | + public function getChanges(); |
|
55 | 55 | |
56 | - /** |
|
57 | - * Stop listening for changes |
|
58 | - * |
|
59 | - * Note that any pending changes will be discarded |
|
60 | - * |
|
61 | - * @since 12.0.0 |
|
62 | - */ |
|
63 | - public function stop(); |
|
56 | + /** |
|
57 | + * Stop listening for changes |
|
58 | + * |
|
59 | + * Note that any pending changes will be discarded |
|
60 | + * |
|
61 | + * @since 12.0.0 |
|
62 | + */ |
|
63 | + public function stop(); |
|
64 | 64 | } |