@@ -31,11 +31,11 @@ |
||
31 | 31 | * @since 5.0.0 |
32 | 32 | */ |
33 | 33 | interface Share_Backend_Collection extends Share_Backend { |
34 | - /** |
|
35 | - * Get the sources of the children of the item |
|
36 | - * @param string $itemSource |
|
37 | - * @return array Returns an array of children each inside an array with the keys: source, target, and file_path if applicable |
|
38 | - * @since 5.0.0 |
|
39 | - */ |
|
40 | - public function getChildren($itemSource); |
|
34 | + /** |
|
35 | + * Get the sources of the children of the item |
|
36 | + * @param string $itemSource |
|
37 | + * @return array Returns an array of children each inside an array with the keys: source, target, and file_path if applicable |
|
38 | + * @since 5.0.0 |
|
39 | + */ |
|
40 | + public function getChildren($itemSource); |
|
41 | 41 | } |
@@ -58,20 +58,20 @@ |
||
58 | 58 | * @since 8.0.0 |
59 | 59 | */ |
60 | 60 | class Constants { |
61 | - /** |
|
62 | - * CRUDS permissions. |
|
63 | - * @since 8.0.0 |
|
64 | - */ |
|
65 | - const PERMISSION_CREATE = 4; |
|
66 | - const PERMISSION_READ = 1; |
|
67 | - const PERMISSION_UPDATE = 2; |
|
68 | - const PERMISSION_DELETE = 8; |
|
69 | - const PERMISSION_SHARE = 16; |
|
70 | - const PERMISSION_ALL = 31; |
|
61 | + /** |
|
62 | + * CRUDS permissions. |
|
63 | + * @since 8.0.0 |
|
64 | + */ |
|
65 | + const PERMISSION_CREATE = 4; |
|
66 | + const PERMISSION_READ = 1; |
|
67 | + const PERMISSION_UPDATE = 2; |
|
68 | + const PERMISSION_DELETE = 8; |
|
69 | + const PERMISSION_SHARE = 16; |
|
70 | + const PERMISSION_ALL = 31; |
|
71 | 71 | |
72 | - /** |
|
73 | - * @since 8.0.0 - Updated in 9.0.0 to allow all POSIX chars since we no |
|
74 | - * longer support windows as server platform. |
|
75 | - */ |
|
76 | - const FILENAME_INVALID_CHARS = "\\/"; |
|
72 | + /** |
|
73 | + * @since 8.0.0 - Updated in 9.0.0 to allow all POSIX chars since we no |
|
74 | + * longer support windows as server platform. |
|
75 | + */ |
|
76 | + const FILENAME_INVALID_CHARS = "\\/"; |
|
77 | 77 | } |
@@ -33,14 +33,14 @@ |
||
33 | 33 | |
34 | 34 | interface IAvatarManager { |
35 | 35 | |
36 | - /** |
|
37 | - * return a user specific instance of \OCP\IAvatar |
|
38 | - * @see \OCP\IAvatar |
|
39 | - * @param string $user the ownCloud user id |
|
40 | - * @return \OCP\IAvatar |
|
41 | - * @throws \Exception In case the username is potentially dangerous |
|
42 | - * @throws \OCP\Files\NotFoundException In case there is no user folder yet |
|
43 | - * @since 6.0.0 |
|
44 | - */ |
|
45 | - public function getAvatar($user); |
|
36 | + /** |
|
37 | + * return a user specific instance of \OCP\IAvatar |
|
38 | + * @see \OCP\IAvatar |
|
39 | + * @param string $user the ownCloud user id |
|
40 | + * @return \OCP\IAvatar |
|
41 | + * @throws \Exception In case the username is potentially dangerous |
|
42 | + * @throws \OCP\Files\NotFoundException In case there is no user folder yet |
|
43 | + * @since 6.0.0 |
|
44 | + */ |
|
45 | + public function getAvatar($user); |
|
46 | 46 | } |
@@ -46,33 +46,33 @@ |
||
46 | 46 | * @since 8.1.0 |
47 | 47 | */ |
48 | 48 | interface IMailer { |
49 | - /** |
|
50 | - * Creates a new message object that can be passed to send() |
|
51 | - * |
|
52 | - * @return Message |
|
53 | - * @since 8.1.0 |
|
54 | - */ |
|
55 | - public function createMessage(); |
|
49 | + /** |
|
50 | + * Creates a new message object that can be passed to send() |
|
51 | + * |
|
52 | + * @return Message |
|
53 | + * @since 8.1.0 |
|
54 | + */ |
|
55 | + public function createMessage(); |
|
56 | 56 | |
57 | - /** |
|
58 | - * Send the specified message. Also sets the from address to the value defined in config.php |
|
59 | - * if no-one has been passed. |
|
60 | - * |
|
61 | - * @param Message $message Message to send |
|
62 | - * @return string[] Array with failed recipients. Be aware that this depends on the used mail backend and |
|
63 | - * therefore should be considered |
|
64 | - * @throws \Exception In case it was not possible to send the message. (for example if an invalid mail address |
|
65 | - * has been supplied.) |
|
66 | - * @since 8.1.0 |
|
67 | - */ |
|
68 | - public function send(Message $message); |
|
57 | + /** |
|
58 | + * Send the specified message. Also sets the from address to the value defined in config.php |
|
59 | + * if no-one has been passed. |
|
60 | + * |
|
61 | + * @param Message $message Message to send |
|
62 | + * @return string[] Array with failed recipients. Be aware that this depends on the used mail backend and |
|
63 | + * therefore should be considered |
|
64 | + * @throws \Exception In case it was not possible to send the message. (for example if an invalid mail address |
|
65 | + * has been supplied.) |
|
66 | + * @since 8.1.0 |
|
67 | + */ |
|
68 | + public function send(Message $message); |
|
69 | 69 | |
70 | - /** |
|
71 | - * Checks if an e-mail address is valid |
|
72 | - * |
|
73 | - * @param string $email Email address to be validated |
|
74 | - * @return bool True if the mail address is valid, false otherwise |
|
75 | - * @since 8.1.0 |
|
76 | - */ |
|
77 | - public function validateMailAddress($email); |
|
70 | + /** |
|
71 | + * Checks if an e-mail address is valid |
|
72 | + * |
|
73 | + * @param string $email Email address to be validated |
|
74 | + * @return bool True if the mail address is valid, false otherwise |
|
75 | + * @since 8.1.0 |
|
76 | + */ |
|
77 | + public function validateMailAddress($email); |
|
78 | 78 | } |
@@ -45,96 +45,96 @@ |
||
45 | 45 | * @since 8.0.0 |
46 | 46 | */ |
47 | 47 | interface IGroupManager { |
48 | - /** |
|
49 | - * Checks whether a given backend is used |
|
50 | - * |
|
51 | - * @param string $backendClass Full classname including complete namespace |
|
52 | - * @return bool |
|
53 | - * @since 8.1.0 |
|
54 | - */ |
|
55 | - public function isBackendUsed($backendClass); |
|
48 | + /** |
|
49 | + * Checks whether a given backend is used |
|
50 | + * |
|
51 | + * @param string $backendClass Full classname including complete namespace |
|
52 | + * @return bool |
|
53 | + * @since 8.1.0 |
|
54 | + */ |
|
55 | + public function isBackendUsed($backendClass); |
|
56 | 56 | |
57 | - /** |
|
58 | - * @param \OCP\GroupInterface $backend |
|
59 | - * @since 8.0.0 |
|
60 | - */ |
|
61 | - public function addBackend($backend); |
|
57 | + /** |
|
58 | + * @param \OCP\GroupInterface $backend |
|
59 | + * @since 8.0.0 |
|
60 | + */ |
|
61 | + public function addBackend($backend); |
|
62 | 62 | |
63 | - /** |
|
64 | - * @since 8.0.0 |
|
65 | - */ |
|
66 | - public function clearBackends(); |
|
63 | + /** |
|
64 | + * @since 8.0.0 |
|
65 | + */ |
|
66 | + public function clearBackends(); |
|
67 | 67 | |
68 | - /** |
|
69 | - * @param string $gid |
|
70 | - * @return \OCP\IGroup |
|
71 | - * @since 8.0.0 |
|
72 | - */ |
|
73 | - public function get($gid); |
|
68 | + /** |
|
69 | + * @param string $gid |
|
70 | + * @return \OCP\IGroup |
|
71 | + * @since 8.0.0 |
|
72 | + */ |
|
73 | + public function get($gid); |
|
74 | 74 | |
75 | - /** |
|
76 | - * @param string $gid |
|
77 | - * @return bool |
|
78 | - * @since 8.0.0 |
|
79 | - */ |
|
80 | - public function groupExists($gid); |
|
75 | + /** |
|
76 | + * @param string $gid |
|
77 | + * @return bool |
|
78 | + * @since 8.0.0 |
|
79 | + */ |
|
80 | + public function groupExists($gid); |
|
81 | 81 | |
82 | - /** |
|
83 | - * @param string $gid |
|
84 | - * @return \OCP\IGroup |
|
85 | - * @since 8.0.0 |
|
86 | - */ |
|
87 | - public function createGroup($gid); |
|
82 | + /** |
|
83 | + * @param string $gid |
|
84 | + * @return \OCP\IGroup |
|
85 | + * @since 8.0.0 |
|
86 | + */ |
|
87 | + public function createGroup($gid); |
|
88 | 88 | |
89 | - /** |
|
90 | - * @param string $search |
|
91 | - * @param int $limit |
|
92 | - * @param int $offset |
|
93 | - * @return \OCP\IGroup[] |
|
94 | - * @since 8.0.0 |
|
95 | - */ |
|
96 | - public function search($search, $limit = null, $offset = null); |
|
89 | + /** |
|
90 | + * @param string $search |
|
91 | + * @param int $limit |
|
92 | + * @param int $offset |
|
93 | + * @return \OCP\IGroup[] |
|
94 | + * @since 8.0.0 |
|
95 | + */ |
|
96 | + public function search($search, $limit = null, $offset = null); |
|
97 | 97 | |
98 | - /** |
|
99 | - * @param \OCP\IUser|null $user |
|
100 | - * @return \OCP\IGroup[] |
|
101 | - * @since 8.0.0 |
|
102 | - */ |
|
103 | - public function getUserGroups($user); |
|
98 | + /** |
|
99 | + * @param \OCP\IUser|null $user |
|
100 | + * @return \OCP\IGroup[] |
|
101 | + * @since 8.0.0 |
|
102 | + */ |
|
103 | + public function getUserGroups($user); |
|
104 | 104 | |
105 | - /** |
|
106 | - * @param \OCP\IUser $user |
|
107 | - * @return array with group names |
|
108 | - * @since 8.0.0 |
|
109 | - */ |
|
110 | - public function getUserGroupIds($user); |
|
105 | + /** |
|
106 | + * @param \OCP\IUser $user |
|
107 | + * @return array with group names |
|
108 | + * @since 8.0.0 |
|
109 | + */ |
|
110 | + public function getUserGroupIds($user); |
|
111 | 111 | |
112 | - /** |
|
113 | - * get a list of all display names in a group |
|
114 | - * |
|
115 | - * @param string $gid |
|
116 | - * @param string $search |
|
117 | - * @param int $limit |
|
118 | - * @param int $offset |
|
119 | - * @return array an array of display names (value) and user ids (key) |
|
120 | - * @since 8.0.0 |
|
121 | - */ |
|
122 | - public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0); |
|
112 | + /** |
|
113 | + * get a list of all display names in a group |
|
114 | + * |
|
115 | + * @param string $gid |
|
116 | + * @param string $search |
|
117 | + * @param int $limit |
|
118 | + * @param int $offset |
|
119 | + * @return array an array of display names (value) and user ids (key) |
|
120 | + * @since 8.0.0 |
|
121 | + */ |
|
122 | + public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0); |
|
123 | 123 | |
124 | - /** |
|
125 | - * Checks if a userId is in the admin group |
|
126 | - * @param string $userId |
|
127 | - * @return bool if admin |
|
128 | - * @since 8.0.0 |
|
129 | - */ |
|
130 | - public function isAdmin($userId); |
|
124 | + /** |
|
125 | + * Checks if a userId is in the admin group |
|
126 | + * @param string $userId |
|
127 | + * @return bool if admin |
|
128 | + * @since 8.0.0 |
|
129 | + */ |
|
130 | + public function isAdmin($userId); |
|
131 | 131 | |
132 | - /** |
|
133 | - * Checks if a userId is in a group |
|
134 | - * @param string $userId |
|
135 | - * @param string $group |
|
136 | - * @return bool if in group |
|
137 | - * @since 8.0.0 |
|
138 | - */ |
|
139 | - public function isInGroup($userId, $group); |
|
132 | + /** |
|
133 | + * Checks if a userId is in a group |
|
134 | + * @param string $userId |
|
135 | + * @param string $group |
|
136 | + * @return bool if in group |
|
137 | + * @since 8.0.0 |
|
138 | + */ |
|
139 | + public function isInGroup($userId, $group); |
|
140 | 140 | } |
@@ -29,12 +29,12 @@ |
||
29 | 29 | * @since 8.2.2 |
30 | 30 | */ |
31 | 31 | interface IMemcacheTTL extends IMemcache { |
32 | - /** |
|
33 | - * Set the ttl for an existing value |
|
34 | - * |
|
35 | - * @param string $key |
|
36 | - * @param int $ttl time to live in seconds |
|
37 | - * @since 8.2.2 |
|
38 | - */ |
|
39 | - public function setTTL($key, $ttl); |
|
32 | + /** |
|
33 | + * Set the ttl for an existing value |
|
34 | + * |
|
35 | + * @param string $key |
|
36 | + * @param int $ttl time to live in seconds |
|
37 | + * @since 8.2.2 |
|
38 | + */ |
|
39 | + public function setTTL($key, $ttl); |
|
40 | 40 | } |
@@ -30,102 +30,102 @@ |
||
30 | 30 | */ |
31 | 31 | interface ISystemTagObjectMapper { |
32 | 32 | |
33 | - /** |
|
34 | - * Get a list of tag ids for the given object ids. |
|
35 | - * |
|
36 | - * This returns an array that maps object id to tag ids |
|
37 | - * [ |
|
38 | - * 1 => array('id1', 'id2'), |
|
39 | - * 2 => array('id3', 'id2'), |
|
40 | - * 3 => array('id5'), |
|
41 | - * 4 => array() |
|
42 | - * ] |
|
43 | - * |
|
44 | - * Untagged objects will have an empty array associated. |
|
45 | - * |
|
46 | - * @param string|array $objIds object ids |
|
47 | - * @param string $objectType object type |
|
48 | - * |
|
49 | - * @return array with object id as key and an array |
|
50 | - * of tag ids as value |
|
51 | - * |
|
52 | - * @since 9.0.0 |
|
53 | - */ |
|
54 | - public function getTagIdsForObjects($objIds, $objectType); |
|
33 | + /** |
|
34 | + * Get a list of tag ids for the given object ids. |
|
35 | + * |
|
36 | + * This returns an array that maps object id to tag ids |
|
37 | + * [ |
|
38 | + * 1 => array('id1', 'id2'), |
|
39 | + * 2 => array('id3', 'id2'), |
|
40 | + * 3 => array('id5'), |
|
41 | + * 4 => array() |
|
42 | + * ] |
|
43 | + * |
|
44 | + * Untagged objects will have an empty array associated. |
|
45 | + * |
|
46 | + * @param string|array $objIds object ids |
|
47 | + * @param string $objectType object type |
|
48 | + * |
|
49 | + * @return array with object id as key and an array |
|
50 | + * of tag ids as value |
|
51 | + * |
|
52 | + * @since 9.0.0 |
|
53 | + */ |
|
54 | + public function getTagIdsForObjects($objIds, $objectType); |
|
55 | 55 | |
56 | - /** |
|
57 | - * Get a list of objects tagged with $tagIds. |
|
58 | - * |
|
59 | - * @param string|array $tagIds Tag id or array of tag ids. |
|
60 | - * @param string $objectType object type |
|
61 | - * @param int $limit Count of object ids you want to get |
|
62 | - * @param string $offset The last object id you already received |
|
63 | - * |
|
64 | - * @return string[] array of object ids or empty array if none found |
|
65 | - * |
|
66 | - * @throws \OCP\SystemTag\TagNotFoundException if at least one of the |
|
67 | - * given tags does not exist |
|
68 | - * @throws \InvalidArgumentException When a limit is specified together with |
|
69 | - * multiple tag ids |
|
70 | - * |
|
71 | - * @since 9.0.0 |
|
72 | - */ |
|
73 | - public function getObjectIdsForTags($tagIds, $objectType, $limit = 0, $offset = ''); |
|
56 | + /** |
|
57 | + * Get a list of objects tagged with $tagIds. |
|
58 | + * |
|
59 | + * @param string|array $tagIds Tag id or array of tag ids. |
|
60 | + * @param string $objectType object type |
|
61 | + * @param int $limit Count of object ids you want to get |
|
62 | + * @param string $offset The last object id you already received |
|
63 | + * |
|
64 | + * @return string[] array of object ids or empty array if none found |
|
65 | + * |
|
66 | + * @throws \OCP\SystemTag\TagNotFoundException if at least one of the |
|
67 | + * given tags does not exist |
|
68 | + * @throws \InvalidArgumentException When a limit is specified together with |
|
69 | + * multiple tag ids |
|
70 | + * |
|
71 | + * @since 9.0.0 |
|
72 | + */ |
|
73 | + public function getObjectIdsForTags($tagIds, $objectType, $limit = 0, $offset = ''); |
|
74 | 74 | |
75 | - /** |
|
76 | - * Assign the given tags to the given object. |
|
77 | - * |
|
78 | - * If at least one of the given tag ids doesn't exist, none of the tags |
|
79 | - * will be assigned. |
|
80 | - * |
|
81 | - * If the relationship already existed, fail silently. |
|
82 | - * |
|
83 | - * @param string $objId object id |
|
84 | - * @param string $objectType object type |
|
85 | - * @param string|array $tagIds tag id or array of tag ids to assign |
|
86 | - * |
|
87 | - * @throws \OCP\SystemTag\TagNotFoundException if at least one of the |
|
88 | - * given tags does not exist |
|
89 | - * |
|
90 | - * @since 9.0.0 |
|
91 | - */ |
|
92 | - public function assignTags($objId, $objectType, $tagIds); |
|
75 | + /** |
|
76 | + * Assign the given tags to the given object. |
|
77 | + * |
|
78 | + * If at least one of the given tag ids doesn't exist, none of the tags |
|
79 | + * will be assigned. |
|
80 | + * |
|
81 | + * If the relationship already existed, fail silently. |
|
82 | + * |
|
83 | + * @param string $objId object id |
|
84 | + * @param string $objectType object type |
|
85 | + * @param string|array $tagIds tag id or array of tag ids to assign |
|
86 | + * |
|
87 | + * @throws \OCP\SystemTag\TagNotFoundException if at least one of the |
|
88 | + * given tags does not exist |
|
89 | + * |
|
90 | + * @since 9.0.0 |
|
91 | + */ |
|
92 | + public function assignTags($objId, $objectType, $tagIds); |
|
93 | 93 | |
94 | - /** |
|
95 | - * Unassign the given tags from the given object. |
|
96 | - * |
|
97 | - * If at least one of the given tag ids doesn't exist, none of the tags |
|
98 | - * will be unassigned. |
|
99 | - * |
|
100 | - * If the relationship did not exist in the first place, fail silently. |
|
101 | - * |
|
102 | - * @param string $objId object id |
|
103 | - * @param string $objectType object type |
|
104 | - * @param string|array $tagIds tag id or array of tag ids to unassign |
|
105 | - * |
|
106 | - * @throws \OCP\SystemTag\TagNotFoundException if at least one of the |
|
107 | - * given tags does not exist |
|
108 | - * |
|
109 | - * @since 9.0.0 |
|
110 | - */ |
|
111 | - public function unassignTags($objId, $objectType, $tagIds); |
|
94 | + /** |
|
95 | + * Unassign the given tags from the given object. |
|
96 | + * |
|
97 | + * If at least one of the given tag ids doesn't exist, none of the tags |
|
98 | + * will be unassigned. |
|
99 | + * |
|
100 | + * If the relationship did not exist in the first place, fail silently. |
|
101 | + * |
|
102 | + * @param string $objId object id |
|
103 | + * @param string $objectType object type |
|
104 | + * @param string|array $tagIds tag id or array of tag ids to unassign |
|
105 | + * |
|
106 | + * @throws \OCP\SystemTag\TagNotFoundException if at least one of the |
|
107 | + * given tags does not exist |
|
108 | + * |
|
109 | + * @since 9.0.0 |
|
110 | + */ |
|
111 | + public function unassignTags($objId, $objectType, $tagIds); |
|
112 | 112 | |
113 | - /** |
|
114 | - * Checks whether the given objects have the given tag. |
|
115 | - * |
|
116 | - * @param string|array $objIds object ids |
|
117 | - * @param string $objectType object type |
|
118 | - * @param string $tagId tag id to check |
|
119 | - * @param bool $all true to check that ALL objects have the tag assigned, |
|
120 | - * false to check that at least ONE object has the tag. |
|
121 | - * |
|
122 | - * @return bool true if the condition set by $all is matched, false |
|
123 | - * otherwise |
|
124 | - * |
|
125 | - * @throws \OCP\SystemTag\TagNotFoundException if the tag does not exist |
|
126 | - * |
|
127 | - * @since 9.0.0 |
|
128 | - */ |
|
129 | - public function haveTag($objIds, $objectType, $tagId, $all = true); |
|
113 | + /** |
|
114 | + * Checks whether the given objects have the given tag. |
|
115 | + * |
|
116 | + * @param string|array $objIds object ids |
|
117 | + * @param string $objectType object type |
|
118 | + * @param string $tagId tag id to check |
|
119 | + * @param bool $all true to check that ALL objects have the tag assigned, |
|
120 | + * false to check that at least ONE object has the tag. |
|
121 | + * |
|
122 | + * @return bool true if the condition set by $all is matched, false |
|
123 | + * otherwise |
|
124 | + * |
|
125 | + * @throws \OCP\SystemTag\TagNotFoundException if the tag does not exist |
|
126 | + * |
|
127 | + * @since 9.0.0 |
|
128 | + */ |
|
129 | + public function haveTag($objIds, $objectType, $tagId, $all = true); |
|
130 | 130 | |
131 | 131 | } |
@@ -30,88 +30,88 @@ |
||
30 | 30 | */ |
31 | 31 | interface ISystemTagManager { |
32 | 32 | |
33 | - /** |
|
34 | - * Returns the tag objects matching the given tag ids. |
|
35 | - * |
|
36 | - * @param array|string $tagIds id or array of unique ids of the tag to retrieve |
|
37 | - * |
|
38 | - * @return \OCP\SystemTag\ISystemTag[] array of system tags with tag id as key |
|
39 | - * |
|
40 | - * @throws \InvalidArgumentException if at least one given tag ids is invalid (string instead of integer, etc.) |
|
41 | - * @throws \OCP\SystemTag\TagNotFoundException if at least one given tag ids did no exist |
|
42 | - * The message contains a json_encoded array of the ids that could not be found |
|
43 | - * |
|
44 | - * @since 9.0.0 |
|
45 | - */ |
|
46 | - public function getTagsByIds($tagIds); |
|
33 | + /** |
|
34 | + * Returns the tag objects matching the given tag ids. |
|
35 | + * |
|
36 | + * @param array|string $tagIds id or array of unique ids of the tag to retrieve |
|
37 | + * |
|
38 | + * @return \OCP\SystemTag\ISystemTag[] array of system tags with tag id as key |
|
39 | + * |
|
40 | + * @throws \InvalidArgumentException if at least one given tag ids is invalid (string instead of integer, etc.) |
|
41 | + * @throws \OCP\SystemTag\TagNotFoundException if at least one given tag ids did no exist |
|
42 | + * The message contains a json_encoded array of the ids that could not be found |
|
43 | + * |
|
44 | + * @since 9.0.0 |
|
45 | + */ |
|
46 | + public function getTagsByIds($tagIds); |
|
47 | 47 | |
48 | - /** |
|
49 | - * Returns the tag object matching the given attributes. |
|
50 | - * |
|
51 | - * @param string $tagName tag name |
|
52 | - * @param bool $userVisible whether the tag is visible by users |
|
53 | - * @param bool $userAssignable whether the tag is assignable by users |
|
54 | - * |
|
55 | - * @return \OCP\SystemTag\ISystemTag system tag |
|
56 | - * |
|
57 | - * @throws \OCP\SystemTag\TagNotFoundException if tag does not exist |
|
58 | - * |
|
59 | - * @since 9.0.0 |
|
60 | - */ |
|
61 | - public function getTag($tagName, $userVisible, $userAssignable); |
|
48 | + /** |
|
49 | + * Returns the tag object matching the given attributes. |
|
50 | + * |
|
51 | + * @param string $tagName tag name |
|
52 | + * @param bool $userVisible whether the tag is visible by users |
|
53 | + * @param bool $userAssignable whether the tag is assignable by users |
|
54 | + * |
|
55 | + * @return \OCP\SystemTag\ISystemTag system tag |
|
56 | + * |
|
57 | + * @throws \OCP\SystemTag\TagNotFoundException if tag does not exist |
|
58 | + * |
|
59 | + * @since 9.0.0 |
|
60 | + */ |
|
61 | + public function getTag($tagName, $userVisible, $userAssignable); |
|
62 | 62 | |
63 | - /** |
|
64 | - * Creates the tag object using the given attributes. |
|
65 | - * |
|
66 | - * @param string $tagName tag name |
|
67 | - * @param bool $userVisible whether the tag is visible by users |
|
68 | - * @param bool $userAssignable whether the tag is assignable by users |
|
69 | - * |
|
70 | - * @return \OCP\SystemTag\ISystemTag system tag |
|
71 | - * |
|
72 | - * @throws \OCP\SystemTag\TagAlreadyExistsException if tag already exists |
|
73 | - * |
|
74 | - * @since 9.0.0 |
|
75 | - */ |
|
76 | - public function createTag($tagName, $userVisible, $userAssignable); |
|
63 | + /** |
|
64 | + * Creates the tag object using the given attributes. |
|
65 | + * |
|
66 | + * @param string $tagName tag name |
|
67 | + * @param bool $userVisible whether the tag is visible by users |
|
68 | + * @param bool $userAssignable whether the tag is assignable by users |
|
69 | + * |
|
70 | + * @return \OCP\SystemTag\ISystemTag system tag |
|
71 | + * |
|
72 | + * @throws \OCP\SystemTag\TagAlreadyExistsException if tag already exists |
|
73 | + * |
|
74 | + * @since 9.0.0 |
|
75 | + */ |
|
76 | + public function createTag($tagName, $userVisible, $userAssignable); |
|
77 | 77 | |
78 | - /** |
|
79 | - * Returns all known tags, optionally filtered by visibility. |
|
80 | - * |
|
81 | - * @param bool|null $visibilityFilter filter by visibility if non-null |
|
82 | - * @param string $nameSearchPattern optional search pattern for the tag name |
|
83 | - * |
|
84 | - * @return \OCP\SystemTag\ISystemTag[] array of system tags or empty array if none found |
|
85 | - * |
|
86 | - * @since 9.0.0 |
|
87 | - */ |
|
88 | - public function getAllTags($visibilityFilter = null, $nameSearchPattern = null); |
|
78 | + /** |
|
79 | + * Returns all known tags, optionally filtered by visibility. |
|
80 | + * |
|
81 | + * @param bool|null $visibilityFilter filter by visibility if non-null |
|
82 | + * @param string $nameSearchPattern optional search pattern for the tag name |
|
83 | + * |
|
84 | + * @return \OCP\SystemTag\ISystemTag[] array of system tags or empty array if none found |
|
85 | + * |
|
86 | + * @since 9.0.0 |
|
87 | + */ |
|
88 | + public function getAllTags($visibilityFilter = null, $nameSearchPattern = null); |
|
89 | 89 | |
90 | - /** |
|
91 | - * Updates the given tag |
|
92 | - * |
|
93 | - * @param string $tagId tag id |
|
94 | - * @param string $newName the new tag name |
|
95 | - * @param bool $userVisible whether the tag is visible by users |
|
96 | - * @param bool $userAssignable whether the tag is assignable by users |
|
97 | - * |
|
98 | - * @throws \OCP\SystemTag\TagNotFoundException if tag with the given id does not exist |
|
99 | - * @throws \OCP\SystemTag\TagAlreadyExistsException if there is already another tag |
|
100 | - * with the same attributes |
|
101 | - * |
|
102 | - * @since 9.0.0 |
|
103 | - */ |
|
104 | - public function updateTag($tagId, $newName, $userVisible, $userAssignable); |
|
90 | + /** |
|
91 | + * Updates the given tag |
|
92 | + * |
|
93 | + * @param string $tagId tag id |
|
94 | + * @param string $newName the new tag name |
|
95 | + * @param bool $userVisible whether the tag is visible by users |
|
96 | + * @param bool $userAssignable whether the tag is assignable by users |
|
97 | + * |
|
98 | + * @throws \OCP\SystemTag\TagNotFoundException if tag with the given id does not exist |
|
99 | + * @throws \OCP\SystemTag\TagAlreadyExistsException if there is already another tag |
|
100 | + * with the same attributes |
|
101 | + * |
|
102 | + * @since 9.0.0 |
|
103 | + */ |
|
104 | + public function updateTag($tagId, $newName, $userVisible, $userAssignable); |
|
105 | 105 | |
106 | - /** |
|
107 | - * Delete the given tags from the database and all their relationships. |
|
108 | - * |
|
109 | - * @param string|array $tagIds array of tag ids |
|
110 | - * |
|
111 | - * @throws \OCP\SystemTag\TagNotFoundException if at least one tag did not exist |
|
112 | - * |
|
113 | - * @since 9.0.0 |
|
114 | - */ |
|
115 | - public function deleteTags($tagIds); |
|
106 | + /** |
|
107 | + * Delete the given tags from the database and all their relationships. |
|
108 | + * |
|
109 | + * @param string|array $tagIds array of tag ids |
|
110 | + * |
|
111 | + * @throws \OCP\SystemTag\TagNotFoundException if at least one tag did not exist |
|
112 | + * |
|
113 | + * @since 9.0.0 |
|
114 | + */ |
|
115 | + public function deleteTags($tagIds); |
|
116 | 116 | |
117 | 117 | } |
@@ -30,28 +30,28 @@ |
||
30 | 30 | */ |
31 | 31 | class TagNotFoundException extends \RuntimeException { |
32 | 32 | |
33 | - /** @var string[] */ |
|
34 | - protected $tags; |
|
33 | + /** @var string[] */ |
|
34 | + protected $tags; |
|
35 | 35 | |
36 | - /** |
|
37 | - * TagNotFoundException constructor. |
|
38 | - * |
|
39 | - * @param string $message |
|
40 | - * @param int $code |
|
41 | - * @param \Exception $previous |
|
42 | - * @param string[] $tags |
|
43 | - * @since 9.0.0 |
|
44 | - */ |
|
45 | - public function __construct($message = '', $code = 0, \Exception $previous = null, array $tags = []) { |
|
46 | - parent::__construct($message, $code, $previous); |
|
47 | - $this->tags = $tags; |
|
48 | - } |
|
36 | + /** |
|
37 | + * TagNotFoundException constructor. |
|
38 | + * |
|
39 | + * @param string $message |
|
40 | + * @param int $code |
|
41 | + * @param \Exception $previous |
|
42 | + * @param string[] $tags |
|
43 | + * @since 9.0.0 |
|
44 | + */ |
|
45 | + public function __construct($message = '', $code = 0, \Exception $previous = null, array $tags = []) { |
|
46 | + parent::__construct($message, $code, $previous); |
|
47 | + $this->tags = $tags; |
|
48 | + } |
|
49 | 49 | |
50 | - /** |
|
51 | - * @return string[] |
|
52 | - * @since 9.0.0 |
|
53 | - */ |
|
54 | - public function getMissingTags() { |
|
55 | - return $this->tags; |
|
56 | - } |
|
50 | + /** |
|
51 | + * @return string[] |
|
52 | + * @since 9.0.0 |
|
53 | + */ |
|
54 | + public function getMissingTags() { |
|
55 | + return $this->tags; |
|
56 | + } |
|
57 | 57 | } |