@@ -41,39 +41,39 @@ |
||
41 | 41 | */ |
42 | 42 | class API { |
43 | 43 | |
44 | - /** |
|
45 | - * API authentication levels |
|
46 | - * @since 8.1.0 |
|
47 | - */ |
|
48 | - const GUEST_AUTH = 0; |
|
49 | - const USER_AUTH = 1; |
|
50 | - const SUBADMIN_AUTH = 2; |
|
51 | - const ADMIN_AUTH = 3; |
|
44 | + /** |
|
45 | + * API authentication levels |
|
46 | + * @since 8.1.0 |
|
47 | + */ |
|
48 | + const GUEST_AUTH = 0; |
|
49 | + const USER_AUTH = 1; |
|
50 | + const SUBADMIN_AUTH = 2; |
|
51 | + const ADMIN_AUTH = 3; |
|
52 | 52 | |
53 | - /** |
|
54 | - * API Response Codes |
|
55 | - * @since 8.1.0 |
|
56 | - */ |
|
57 | - const RESPOND_UNAUTHORISED = 997; |
|
58 | - const RESPOND_SERVER_ERROR = 996; |
|
59 | - const RESPOND_NOT_FOUND = 998; |
|
60 | - const RESPOND_UNKNOWN_ERROR = 999; |
|
53 | + /** |
|
54 | + * API Response Codes |
|
55 | + * @since 8.1.0 |
|
56 | + */ |
|
57 | + const RESPOND_UNAUTHORISED = 997; |
|
58 | + const RESPOND_SERVER_ERROR = 996; |
|
59 | + const RESPOND_NOT_FOUND = 998; |
|
60 | + const RESPOND_UNKNOWN_ERROR = 999; |
|
61 | 61 | |
62 | - /** |
|
63 | - * registers an api call |
|
64 | - * @param string $method the http method |
|
65 | - * @param string $url the url to match |
|
66 | - * @param callable $action the function to run |
|
67 | - * @param string $app the id of the app registering the call |
|
68 | - * @param int $authLevel the level of authentication required for the call (See `self::*_AUTH` constants) |
|
69 | - * @param array $defaults |
|
70 | - * @param array $requirements |
|
71 | - * @since 5.0.0 |
|
72 | - * @deprecated 9.1.0 Use the AppFramework |
|
73 | - */ |
|
74 | - public static function register($method, $url, $action, $app, $authLevel = self::USER_AUTH, |
|
75 | - $defaults = array(), $requirements = array()){ |
|
76 | - \OC_API::register($method, $url, $action, $app, $authLevel, $defaults, $requirements); |
|
77 | - } |
|
62 | + /** |
|
63 | + * registers an api call |
|
64 | + * @param string $method the http method |
|
65 | + * @param string $url the url to match |
|
66 | + * @param callable $action the function to run |
|
67 | + * @param string $app the id of the app registering the call |
|
68 | + * @param int $authLevel the level of authentication required for the call (See `self::*_AUTH` constants) |
|
69 | + * @param array $defaults |
|
70 | + * @param array $requirements |
|
71 | + * @since 5.0.0 |
|
72 | + * @deprecated 9.1.0 Use the AppFramework |
|
73 | + */ |
|
74 | + public static function register($method, $url, $action, $app, $authLevel = self::USER_AUTH, |
|
75 | + $defaults = array(), $requirements = array()){ |
|
76 | + \OC_API::register($method, $url, $action, $app, $authLevel, $defaults, $requirements); |
|
77 | + } |
|
78 | 78 | |
79 | 79 | } |
@@ -38,11 +38,11 @@ |
||
38 | 38 | */ |
39 | 39 | interface IUserBackend { |
40 | 40 | |
41 | - /** |
|
42 | - * Backend name to be shown in user management |
|
43 | - * @return string the name of the backend to be shown |
|
44 | - * @since 8.0.0 |
|
45 | - */ |
|
46 | - public function getBackendName(); |
|
41 | + /** |
|
42 | + * Backend name to be shown in user management |
|
43 | + * @return string the name of the backend to be shown |
|
44 | + * @since 8.0.0 |
|
45 | + */ |
|
46 | + public function getBackendName(); |
|
47 | 47 | |
48 | 48 | } |
@@ -50,179 +50,179 @@ |
||
50 | 50 | |
51 | 51 | interface ITags { |
52 | 52 | |
53 | - /** |
|
54 | - * Check if any tags are saved for this type and user. |
|
55 | - * |
|
56 | - * @return boolean |
|
57 | - * @since 6.0.0 |
|
58 | - */ |
|
59 | - public function isEmpty(); |
|
60 | - |
|
61 | - /** |
|
62 | - * Returns an array mapping a given tag's properties to its values: |
|
63 | - * ['id' => 0, 'name' = 'Tag', 'owner' = 'User', 'type' => 'tagtype'] |
|
64 | - * |
|
65 | - * @param string $id The ID of the tag that is going to be mapped |
|
66 | - * @return array|false |
|
67 | - * @since 8.0.0 |
|
68 | - */ |
|
69 | - public function getTag($id); |
|
70 | - |
|
71 | - /** |
|
72 | - * Get the tags for a specific user. |
|
73 | - * |
|
74 | - * This returns an array with id/name maps: |
|
75 | - * [ |
|
76 | - * ['id' => 0, 'name' = 'First tag'], |
|
77 | - * ['id' => 1, 'name' = 'Second tag'], |
|
78 | - * ] |
|
79 | - * |
|
80 | - * @return array |
|
81 | - * @since 6.0.0 |
|
82 | - */ |
|
83 | - public function getTags(); |
|
84 | - |
|
85 | - /** |
|
86 | - * Get a list of tags for the given item ids. |
|
87 | - * |
|
88 | - * This returns an array with object id / tag names: |
|
89 | - * [ |
|
90 | - * 1 => array('First tag', 'Second tag'), |
|
91 | - * 2 => array('Second tag'), |
|
92 | - * 3 => array('Second tag', 'Third tag'), |
|
93 | - * ] |
|
94 | - * |
|
95 | - * @param array $objIds item ids |
|
96 | - * @return array|boolean with object id as key and an array |
|
97 | - * of tag names as value or false if an error occurred |
|
98 | - * @since 8.0.0 |
|
99 | - */ |
|
100 | - public function getTagsForObjects(array $objIds); |
|
101 | - |
|
102 | - /** |
|
103 | - * Get a list of items tagged with $tag. |
|
104 | - * |
|
105 | - * Throws an exception if the tag could not be found. |
|
106 | - * |
|
107 | - * @param string|integer $tag Tag id or name. |
|
108 | - * @return array|false An array of object ids or false on error. |
|
109 | - * @since 6.0.0 |
|
110 | - */ |
|
111 | - public function getIdsForTag($tag); |
|
112 | - |
|
113 | - /** |
|
114 | - * Checks whether a tag is already saved. |
|
115 | - * |
|
116 | - * @param string $name The name to check for. |
|
117 | - * @return bool |
|
118 | - * @since 6.0.0 |
|
119 | - */ |
|
120 | - public function hasTag($name); |
|
121 | - |
|
122 | - /** |
|
123 | - * Checks whether a tag is saved for the given user, |
|
124 | - * disregarding the ones shared with him or her. |
|
125 | - * |
|
126 | - * @param string $name The tag name to check for. |
|
127 | - * @param string $user The user whose tags are to be checked. |
|
128 | - * @return bool |
|
129 | - * @since 8.0.0 |
|
130 | - */ |
|
131 | - public function userHasTag($name, $user); |
|
132 | - |
|
133 | - /** |
|
134 | - * Add a new tag. |
|
135 | - * |
|
136 | - * @param string $name A string with a name of the tag |
|
137 | - * @return int|false the id of the added tag or false if it already exists. |
|
138 | - * @since 6.0.0 |
|
139 | - */ |
|
140 | - public function add($name); |
|
141 | - |
|
142 | - /** |
|
143 | - * Rename tag. |
|
144 | - * |
|
145 | - * @param string|integer $from The name or ID of the existing tag |
|
146 | - * @param string $to The new name of the tag. |
|
147 | - * @return bool |
|
148 | - * @since 6.0.0 |
|
149 | - */ |
|
150 | - public function rename($from, $to); |
|
151 | - |
|
152 | - /** |
|
153 | - * Add a list of new tags. |
|
154 | - * |
|
155 | - * @param string[] $names A string with a name or an array of strings containing |
|
156 | - * the name(s) of the to add. |
|
157 | - * @param bool $sync When true, save the tags |
|
158 | - * @param int|null $id int Optional object id to add to this|these tag(s) |
|
159 | - * @return bool Returns false on error. |
|
160 | - * @since 6.0.0 |
|
161 | - */ |
|
162 | - public function addMultiple($names, $sync=false, $id = null); |
|
163 | - |
|
164 | - /** |
|
165 | - * Delete tag/object relations from the db |
|
166 | - * |
|
167 | - * @param array $ids The ids of the objects |
|
168 | - * @return boolean Returns false on error. |
|
169 | - * @since 6.0.0 |
|
170 | - */ |
|
171 | - public function purgeObjects(array $ids); |
|
172 | - |
|
173 | - /** |
|
174 | - * Get favorites for an object type |
|
175 | - * |
|
176 | - * @return array|false An array of object ids. |
|
177 | - * @since 6.0.0 |
|
178 | - */ |
|
179 | - public function getFavorites(); |
|
180 | - |
|
181 | - /** |
|
182 | - * Add an object to favorites |
|
183 | - * |
|
184 | - * @param int $objid The id of the object |
|
185 | - * @return boolean |
|
186 | - * @since 6.0.0 |
|
187 | - */ |
|
188 | - public function addToFavorites($objid); |
|
189 | - |
|
190 | - /** |
|
191 | - * Remove an object from favorites |
|
192 | - * |
|
193 | - * @param int $objid The id of the object |
|
194 | - * @return boolean |
|
195 | - * @since 6.0.0 |
|
196 | - */ |
|
197 | - public function removeFromFavorites($objid); |
|
198 | - |
|
199 | - /** |
|
200 | - * Creates a tag/object relation. |
|
201 | - * |
|
202 | - * @param int $objid The id of the object |
|
203 | - * @param string $tag The id or name of the tag |
|
204 | - * @return boolean Returns false on database error. |
|
205 | - * @since 6.0.0 |
|
206 | - */ |
|
207 | - public function tagAs($objid, $tag); |
|
208 | - |
|
209 | - /** |
|
210 | - * Delete single tag/object relation from the db |
|
211 | - * |
|
212 | - * @param int $objid The id of the object |
|
213 | - * @param string $tag The id or name of the tag |
|
214 | - * @return boolean |
|
215 | - * @since 6.0.0 |
|
216 | - */ |
|
217 | - public function unTag($objid, $tag); |
|
218 | - |
|
219 | - /** |
|
220 | - * Delete tags from the database |
|
221 | - * |
|
222 | - * @param string[]|integer[] $names An array of tags (names or IDs) to delete |
|
223 | - * @return bool Returns false on error |
|
224 | - * @since 6.0.0 |
|
225 | - */ |
|
226 | - public function delete($names); |
|
53 | + /** |
|
54 | + * Check if any tags are saved for this type and user. |
|
55 | + * |
|
56 | + * @return boolean |
|
57 | + * @since 6.0.0 |
|
58 | + */ |
|
59 | + public function isEmpty(); |
|
60 | + |
|
61 | + /** |
|
62 | + * Returns an array mapping a given tag's properties to its values: |
|
63 | + * ['id' => 0, 'name' = 'Tag', 'owner' = 'User', 'type' => 'tagtype'] |
|
64 | + * |
|
65 | + * @param string $id The ID of the tag that is going to be mapped |
|
66 | + * @return array|false |
|
67 | + * @since 8.0.0 |
|
68 | + */ |
|
69 | + public function getTag($id); |
|
70 | + |
|
71 | + /** |
|
72 | + * Get the tags for a specific user. |
|
73 | + * |
|
74 | + * This returns an array with id/name maps: |
|
75 | + * [ |
|
76 | + * ['id' => 0, 'name' = 'First tag'], |
|
77 | + * ['id' => 1, 'name' = 'Second tag'], |
|
78 | + * ] |
|
79 | + * |
|
80 | + * @return array |
|
81 | + * @since 6.0.0 |
|
82 | + */ |
|
83 | + public function getTags(); |
|
84 | + |
|
85 | + /** |
|
86 | + * Get a list of tags for the given item ids. |
|
87 | + * |
|
88 | + * This returns an array with object id / tag names: |
|
89 | + * [ |
|
90 | + * 1 => array('First tag', 'Second tag'), |
|
91 | + * 2 => array('Second tag'), |
|
92 | + * 3 => array('Second tag', 'Third tag'), |
|
93 | + * ] |
|
94 | + * |
|
95 | + * @param array $objIds item ids |
|
96 | + * @return array|boolean with object id as key and an array |
|
97 | + * of tag names as value or false if an error occurred |
|
98 | + * @since 8.0.0 |
|
99 | + */ |
|
100 | + public function getTagsForObjects(array $objIds); |
|
101 | + |
|
102 | + /** |
|
103 | + * Get a list of items tagged with $tag. |
|
104 | + * |
|
105 | + * Throws an exception if the tag could not be found. |
|
106 | + * |
|
107 | + * @param string|integer $tag Tag id or name. |
|
108 | + * @return array|false An array of object ids or false on error. |
|
109 | + * @since 6.0.0 |
|
110 | + */ |
|
111 | + public function getIdsForTag($tag); |
|
112 | + |
|
113 | + /** |
|
114 | + * Checks whether a tag is already saved. |
|
115 | + * |
|
116 | + * @param string $name The name to check for. |
|
117 | + * @return bool |
|
118 | + * @since 6.0.0 |
|
119 | + */ |
|
120 | + public function hasTag($name); |
|
121 | + |
|
122 | + /** |
|
123 | + * Checks whether a tag is saved for the given user, |
|
124 | + * disregarding the ones shared with him or her. |
|
125 | + * |
|
126 | + * @param string $name The tag name to check for. |
|
127 | + * @param string $user The user whose tags are to be checked. |
|
128 | + * @return bool |
|
129 | + * @since 8.0.0 |
|
130 | + */ |
|
131 | + public function userHasTag($name, $user); |
|
132 | + |
|
133 | + /** |
|
134 | + * Add a new tag. |
|
135 | + * |
|
136 | + * @param string $name A string with a name of the tag |
|
137 | + * @return int|false the id of the added tag or false if it already exists. |
|
138 | + * @since 6.0.0 |
|
139 | + */ |
|
140 | + public function add($name); |
|
141 | + |
|
142 | + /** |
|
143 | + * Rename tag. |
|
144 | + * |
|
145 | + * @param string|integer $from The name or ID of the existing tag |
|
146 | + * @param string $to The new name of the tag. |
|
147 | + * @return bool |
|
148 | + * @since 6.0.0 |
|
149 | + */ |
|
150 | + public function rename($from, $to); |
|
151 | + |
|
152 | + /** |
|
153 | + * Add a list of new tags. |
|
154 | + * |
|
155 | + * @param string[] $names A string with a name or an array of strings containing |
|
156 | + * the name(s) of the to add. |
|
157 | + * @param bool $sync When true, save the tags |
|
158 | + * @param int|null $id int Optional object id to add to this|these tag(s) |
|
159 | + * @return bool Returns false on error. |
|
160 | + * @since 6.0.0 |
|
161 | + */ |
|
162 | + public function addMultiple($names, $sync=false, $id = null); |
|
163 | + |
|
164 | + /** |
|
165 | + * Delete tag/object relations from the db |
|
166 | + * |
|
167 | + * @param array $ids The ids of the objects |
|
168 | + * @return boolean Returns false on error. |
|
169 | + * @since 6.0.0 |
|
170 | + */ |
|
171 | + public function purgeObjects(array $ids); |
|
172 | + |
|
173 | + /** |
|
174 | + * Get favorites for an object type |
|
175 | + * |
|
176 | + * @return array|false An array of object ids. |
|
177 | + * @since 6.0.0 |
|
178 | + */ |
|
179 | + public function getFavorites(); |
|
180 | + |
|
181 | + /** |
|
182 | + * Add an object to favorites |
|
183 | + * |
|
184 | + * @param int $objid The id of the object |
|
185 | + * @return boolean |
|
186 | + * @since 6.0.0 |
|
187 | + */ |
|
188 | + public function addToFavorites($objid); |
|
189 | + |
|
190 | + /** |
|
191 | + * Remove an object from favorites |
|
192 | + * |
|
193 | + * @param int $objid The id of the object |
|
194 | + * @return boolean |
|
195 | + * @since 6.0.0 |
|
196 | + */ |
|
197 | + public function removeFromFavorites($objid); |
|
198 | + |
|
199 | + /** |
|
200 | + * Creates a tag/object relation. |
|
201 | + * |
|
202 | + * @param int $objid The id of the object |
|
203 | + * @param string $tag The id or name of the tag |
|
204 | + * @return boolean Returns false on database error. |
|
205 | + * @since 6.0.0 |
|
206 | + */ |
|
207 | + public function tagAs($objid, $tag); |
|
208 | + |
|
209 | + /** |
|
210 | + * Delete single tag/object relation from the db |
|
211 | + * |
|
212 | + * @param int $objid The id of the object |
|
213 | + * @param string $tag The id or name of the tag |
|
214 | + * @return boolean |
|
215 | + * @since 6.0.0 |
|
216 | + */ |
|
217 | + public function unTag($objid, $tag); |
|
218 | + |
|
219 | + /** |
|
220 | + * Delete tags from the database |
|
221 | + * |
|
222 | + * @param string[]|integer[] $names An array of tags (names or IDs) to delete |
|
223 | + * @return bool Returns false on error |
|
224 | + * @since 6.0.0 |
|
225 | + */ |
|
226 | + public function delete($names); |
|
227 | 227 | |
228 | 228 | } |
@@ -30,33 +30,33 @@ |
||
30 | 30 | * @since 8.0.0 |
31 | 31 | */ |
32 | 32 | interface IEvent { |
33 | - /** |
|
34 | - * @return string |
|
35 | - * @since 8.0.0 |
|
36 | - */ |
|
37 | - public function getId(); |
|
33 | + /** |
|
34 | + * @return string |
|
35 | + * @since 8.0.0 |
|
36 | + */ |
|
37 | + public function getId(); |
|
38 | 38 | |
39 | - /** |
|
40 | - * @return string |
|
41 | - * @since 8.0.0 |
|
42 | - */ |
|
43 | - public function getDescription(); |
|
39 | + /** |
|
40 | + * @return string |
|
41 | + * @since 8.0.0 |
|
42 | + */ |
|
43 | + public function getDescription(); |
|
44 | 44 | |
45 | - /** |
|
46 | - * @return float |
|
47 | - * @since 8.0.0 |
|
48 | - */ |
|
49 | - public function getStart(); |
|
45 | + /** |
|
46 | + * @return float |
|
47 | + * @since 8.0.0 |
|
48 | + */ |
|
49 | + public function getStart(); |
|
50 | 50 | |
51 | - /** |
|
52 | - * @return float |
|
53 | - * @since 8.0.0 |
|
54 | - */ |
|
55 | - public function getEnd(); |
|
51 | + /** |
|
52 | + * @return float |
|
53 | + * @since 8.0.0 |
|
54 | + */ |
|
55 | + public function getEnd(); |
|
56 | 56 | |
57 | - /** |
|
58 | - * @return float |
|
59 | - * @since 8.0.0 |
|
60 | - */ |
|
61 | - public function getDuration(); |
|
57 | + /** |
|
58 | + * @return float |
|
59 | + * @since 8.0.0 |
|
60 | + */ |
|
61 | + public function getDuration(); |
|
62 | 62 | } |
@@ -47,118 +47,118 @@ |
||
47 | 47 | * @deprecated 8.0.0 use methods of \OCP\IConfig |
48 | 48 | */ |
49 | 49 | class Config { |
50 | - /** |
|
51 | - * Gets a value from config.php |
|
52 | - * @param string $key key |
|
53 | - * @param mixed $default = null default value |
|
54 | - * @return mixed the value or $default |
|
55 | - * @deprecated 8.0.0 use method getSystemValue of \OCP\IConfig |
|
56 | - * |
|
57 | - * This function gets the value from config.php. If it does not exist, |
|
58 | - * $default will be returned. |
|
59 | - */ |
|
60 | - public static function getSystemValue( $key, $default = null ) { |
|
61 | - return \OC::$server->getConfig()->getSystemValue( $key, $default ); |
|
62 | - } |
|
50 | + /** |
|
51 | + * Gets a value from config.php |
|
52 | + * @param string $key key |
|
53 | + * @param mixed $default = null default value |
|
54 | + * @return mixed the value or $default |
|
55 | + * @deprecated 8.0.0 use method getSystemValue of \OCP\IConfig |
|
56 | + * |
|
57 | + * This function gets the value from config.php. If it does not exist, |
|
58 | + * $default will be returned. |
|
59 | + */ |
|
60 | + public static function getSystemValue( $key, $default = null ) { |
|
61 | + return \OC::$server->getConfig()->getSystemValue( $key, $default ); |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * Sets a value |
|
66 | - * @param string $key key |
|
67 | - * @param mixed $value value |
|
68 | - * @return bool |
|
69 | - * @deprecated 8.0.0 use method setSystemValue of \OCP\IConfig |
|
70 | - * |
|
71 | - * This function sets the value and writes the config.php. If the file can |
|
72 | - * not be written, false will be returned. |
|
73 | - */ |
|
74 | - public static function setSystemValue( $key, $value ) { |
|
75 | - try { |
|
76 | - \OC::$server->getConfig()->setSystemValue( $key, $value ); |
|
77 | - } catch (\Exception $e) { |
|
78 | - return false; |
|
79 | - } |
|
80 | - return true; |
|
81 | - } |
|
64 | + /** |
|
65 | + * Sets a value |
|
66 | + * @param string $key key |
|
67 | + * @param mixed $value value |
|
68 | + * @return bool |
|
69 | + * @deprecated 8.0.0 use method setSystemValue of \OCP\IConfig |
|
70 | + * |
|
71 | + * This function sets the value and writes the config.php. If the file can |
|
72 | + * not be written, false will be returned. |
|
73 | + */ |
|
74 | + public static function setSystemValue( $key, $value ) { |
|
75 | + try { |
|
76 | + \OC::$server->getConfig()->setSystemValue( $key, $value ); |
|
77 | + } catch (\Exception $e) { |
|
78 | + return false; |
|
79 | + } |
|
80 | + return true; |
|
81 | + } |
|
82 | 82 | |
83 | - /** |
|
84 | - * Deletes a value from config.php |
|
85 | - * @param string $key key |
|
86 | - * @deprecated 8.0.0 use method deleteSystemValue of \OCP\IConfig |
|
87 | - * |
|
88 | - * This function deletes the value from config.php. |
|
89 | - */ |
|
90 | - public static function deleteSystemValue( $key ) { |
|
91 | - \OC::$server->getConfig()->deleteSystemValue( $key ); |
|
92 | - } |
|
83 | + /** |
|
84 | + * Deletes a value from config.php |
|
85 | + * @param string $key key |
|
86 | + * @deprecated 8.0.0 use method deleteSystemValue of \OCP\IConfig |
|
87 | + * |
|
88 | + * This function deletes the value from config.php. |
|
89 | + */ |
|
90 | + public static function deleteSystemValue( $key ) { |
|
91 | + \OC::$server->getConfig()->deleteSystemValue( $key ); |
|
92 | + } |
|
93 | 93 | |
94 | - /** |
|
95 | - * Gets the config value |
|
96 | - * @param string $app app |
|
97 | - * @param string $key key |
|
98 | - * @param string $default = null, default value if the key does not exist |
|
99 | - * @return string the value or $default |
|
100 | - * @deprecated 8.0.0 use method getAppValue of \OCP\IConfig |
|
101 | - * |
|
102 | - * This function gets a value from the appconfig table. If the key does |
|
103 | - * not exist the default value will be returned |
|
104 | - */ |
|
105 | - public static function getAppValue( $app, $key, $default = null ) { |
|
106 | - return \OC::$server->getConfig()->getAppValue( $app, $key, $default ); |
|
107 | - } |
|
94 | + /** |
|
95 | + * Gets the config value |
|
96 | + * @param string $app app |
|
97 | + * @param string $key key |
|
98 | + * @param string $default = null, default value if the key does not exist |
|
99 | + * @return string the value or $default |
|
100 | + * @deprecated 8.0.0 use method getAppValue of \OCP\IConfig |
|
101 | + * |
|
102 | + * This function gets a value from the appconfig table. If the key does |
|
103 | + * not exist the default value will be returned |
|
104 | + */ |
|
105 | + public static function getAppValue( $app, $key, $default = null ) { |
|
106 | + return \OC::$server->getConfig()->getAppValue( $app, $key, $default ); |
|
107 | + } |
|
108 | 108 | |
109 | - /** |
|
110 | - * Sets a value in the appconfig |
|
111 | - * @param string $app app |
|
112 | - * @param string $key key |
|
113 | - * @param string $value value |
|
114 | - * @return boolean true/false |
|
115 | - * @deprecated 8.0.0 use method setAppValue of \OCP\IConfig |
|
116 | - * |
|
117 | - * Sets a value. If the key did not exist before it will be created. |
|
118 | - */ |
|
119 | - public static function setAppValue( $app, $key, $value ) { |
|
120 | - try { |
|
121 | - \OC::$server->getConfig()->setAppValue( $app, $key, $value ); |
|
122 | - } catch (\Exception $e) { |
|
123 | - return false; |
|
124 | - } |
|
125 | - return true; |
|
126 | - } |
|
109 | + /** |
|
110 | + * Sets a value in the appconfig |
|
111 | + * @param string $app app |
|
112 | + * @param string $key key |
|
113 | + * @param string $value value |
|
114 | + * @return boolean true/false |
|
115 | + * @deprecated 8.0.0 use method setAppValue of \OCP\IConfig |
|
116 | + * |
|
117 | + * Sets a value. If the key did not exist before it will be created. |
|
118 | + */ |
|
119 | + public static function setAppValue( $app, $key, $value ) { |
|
120 | + try { |
|
121 | + \OC::$server->getConfig()->setAppValue( $app, $key, $value ); |
|
122 | + } catch (\Exception $e) { |
|
123 | + return false; |
|
124 | + } |
|
125 | + return true; |
|
126 | + } |
|
127 | 127 | |
128 | - /** |
|
129 | - * Gets the preference |
|
130 | - * @param string $user user |
|
131 | - * @param string $app app |
|
132 | - * @param string $key key |
|
133 | - * @param string $default = null, default value if the key does not exist |
|
134 | - * @return string the value or $default |
|
135 | - * @deprecated 8.0.0 use method getUserValue of \OCP\IConfig |
|
136 | - * |
|
137 | - * This function gets a value from the preferences table. If the key does |
|
138 | - * not exist the default value will be returned |
|
139 | - */ |
|
140 | - public static function getUserValue( $user, $app, $key, $default = null ) { |
|
141 | - return \OC::$server->getConfig()->getUserValue( $user, $app, $key, $default ); |
|
142 | - } |
|
128 | + /** |
|
129 | + * Gets the preference |
|
130 | + * @param string $user user |
|
131 | + * @param string $app app |
|
132 | + * @param string $key key |
|
133 | + * @param string $default = null, default value if the key does not exist |
|
134 | + * @return string the value or $default |
|
135 | + * @deprecated 8.0.0 use method getUserValue of \OCP\IConfig |
|
136 | + * |
|
137 | + * This function gets a value from the preferences table. If the key does |
|
138 | + * not exist the default value will be returned |
|
139 | + */ |
|
140 | + public static function getUserValue( $user, $app, $key, $default = null ) { |
|
141 | + return \OC::$server->getConfig()->getUserValue( $user, $app, $key, $default ); |
|
142 | + } |
|
143 | 143 | |
144 | - /** |
|
145 | - * Sets a value in the preferences |
|
146 | - * @param string $user user |
|
147 | - * @param string $app app |
|
148 | - * @param string $key key |
|
149 | - * @param string $value value |
|
150 | - * @return bool |
|
151 | - * @deprecated 8.0.0 use method setUserValue of \OCP\IConfig |
|
152 | - * |
|
153 | - * Adds a value to the preferences. If the key did not exist before, it |
|
154 | - * will be added automagically. |
|
155 | - */ |
|
156 | - public static function setUserValue( $user, $app, $key, $value ) { |
|
157 | - try { |
|
158 | - \OC::$server->getConfig()->setUserValue( $user, $app, $key, $value ); |
|
159 | - } catch (\Exception $e) { |
|
160 | - return false; |
|
161 | - } |
|
162 | - return true; |
|
163 | - } |
|
144 | + /** |
|
145 | + * Sets a value in the preferences |
|
146 | + * @param string $user user |
|
147 | + * @param string $app app |
|
148 | + * @param string $key key |
|
149 | + * @param string $value value |
|
150 | + * @return bool |
|
151 | + * @deprecated 8.0.0 use method setUserValue of \OCP\IConfig |
|
152 | + * |
|
153 | + * Adds a value to the preferences. If the key did not exist before, it |
|
154 | + * will be added automagically. |
|
155 | + */ |
|
156 | + public static function setUserValue( $user, $app, $key, $value ) { |
|
157 | + try { |
|
158 | + \OC::$server->getConfig()->setUserValue( $user, $app, $key, $value ); |
|
159 | + } catch (\Exception $e) { |
|
160 | + return false; |
|
161 | + } |
|
162 | + return true; |
|
163 | + } |
|
164 | 164 | } |
@@ -31,41 +31,41 @@ |
||
31 | 31 | * @since 8.0.0 |
32 | 32 | */ |
33 | 33 | interface ITempManager { |
34 | - /** |
|
35 | - * Create a temporary file and return the path |
|
36 | - * |
|
37 | - * @param string $postFix |
|
38 | - * @return string |
|
39 | - * @since 8.0.0 |
|
40 | - */ |
|
41 | - public function getTemporaryFile($postFix = ''); |
|
34 | + /** |
|
35 | + * Create a temporary file and return the path |
|
36 | + * |
|
37 | + * @param string $postFix |
|
38 | + * @return string |
|
39 | + * @since 8.0.0 |
|
40 | + */ |
|
41 | + public function getTemporaryFile($postFix = ''); |
|
42 | 42 | |
43 | - /** |
|
44 | - * Create a temporary folder and return the path |
|
45 | - * |
|
46 | - * @param string $postFix |
|
47 | - * @return string |
|
48 | - * @since 8.0.0 |
|
49 | - */ |
|
50 | - public function getTemporaryFolder($postFix = ''); |
|
43 | + /** |
|
44 | + * Create a temporary folder and return the path |
|
45 | + * |
|
46 | + * @param string $postFix |
|
47 | + * @return string |
|
48 | + * @since 8.0.0 |
|
49 | + */ |
|
50 | + public function getTemporaryFolder($postFix = ''); |
|
51 | 51 | |
52 | - /** |
|
53 | - * Remove the temporary files and folders generated during this request |
|
54 | - * @since 8.0.0 |
|
55 | - */ |
|
56 | - public function clean(); |
|
52 | + /** |
|
53 | + * Remove the temporary files and folders generated during this request |
|
54 | + * @since 8.0.0 |
|
55 | + */ |
|
56 | + public function clean(); |
|
57 | 57 | |
58 | - /** |
|
59 | - * Remove old temporary files and folders that were failed to be cleaned |
|
60 | - * @since 8.0.0 |
|
61 | - */ |
|
62 | - public function cleanOld(); |
|
58 | + /** |
|
59 | + * Remove old temporary files and folders that were failed to be cleaned |
|
60 | + * @since 8.0.0 |
|
61 | + */ |
|
62 | + public function cleanOld(); |
|
63 | 63 | |
64 | - /** |
|
65 | - * Get the temporary base directory |
|
66 | - * |
|
67 | - * @return string |
|
68 | - * @since 8.2.0 |
|
69 | - */ |
|
70 | - public function getTempBaseDir(); |
|
64 | + /** |
|
65 | + * Get the temporary base directory |
|
66 | + * |
|
67 | + * @return string |
|
68 | + * @since 8.2.0 |
|
69 | + */ |
|
70 | + public function getTempBaseDir(); |
|
71 | 71 | } |
@@ -31,18 +31,18 @@ |
||
31 | 31 | * @since 9.1 |
32 | 32 | */ |
33 | 33 | interface IManager { |
34 | - /** |
|
35 | - * @param IStorage $storage |
|
36 | - * @param string $path |
|
37 | - * @since 9.1 |
|
38 | - */ |
|
39 | - public function setFileInfo(IStorage $storage, $path); |
|
34 | + /** |
|
35 | + * @param IStorage $storage |
|
36 | + * @param string $path |
|
37 | + * @since 9.1 |
|
38 | + */ |
|
39 | + public function setFileInfo(IStorage $storage, $path); |
|
40 | 40 | |
41 | - /** |
|
42 | - * @param string $class |
|
43 | - * @param bool $returnFirstMatchingOperationOnly |
|
44 | - * @return array |
|
45 | - * @since 9.1 |
|
46 | - */ |
|
47 | - public function getMatchingOperations($class, $returnFirstMatchingOperationOnly = true); |
|
41 | + /** |
|
42 | + * @param string $class |
|
43 | + * @param bool $returnFirstMatchingOperationOnly |
|
44 | + * @return array |
|
45 | + * @since 9.1 |
|
46 | + */ |
|
47 | + public function getMatchingOperations($class, $returnFirstMatchingOperationOnly = true); |
|
48 | 48 | } |
@@ -28,12 +28,12 @@ |
||
28 | 28 | * @since 9.1 |
29 | 29 | */ |
30 | 30 | interface IOperation { |
31 | - /** |
|
32 | - * @param string $name |
|
33 | - * @param array[] $checks |
|
34 | - * @param string $operation |
|
35 | - * @throws \UnexpectedValueException |
|
36 | - * @since 9.1 |
|
37 | - */ |
|
38 | - public function validateOperation($name, array $checks, $operation); |
|
31 | + /** |
|
32 | + * @param string $name |
|
33 | + * @param array[] $checks |
|
34 | + * @param string $operation |
|
35 | + * @throws \UnexpectedValueException |
|
36 | + * @since 9.1 |
|
37 | + */ |
|
38 | + public function validateOperation($name, array $checks, $operation); |
|
39 | 39 | } |
@@ -31,26 +31,26 @@ |
||
31 | 31 | * @since 9.1 |
32 | 32 | */ |
33 | 33 | interface ICheck { |
34 | - /** |
|
35 | - * @param IStorage $storage |
|
36 | - * @param string $path |
|
37 | - * @since 9.1 |
|
38 | - */ |
|
39 | - public function setFileInfo(IStorage $storage, $path); |
|
34 | + /** |
|
35 | + * @param IStorage $storage |
|
36 | + * @param string $path |
|
37 | + * @since 9.1 |
|
38 | + */ |
|
39 | + public function setFileInfo(IStorage $storage, $path); |
|
40 | 40 | |
41 | - /** |
|
42 | - * @param string $operator |
|
43 | - * @param string $value |
|
44 | - * @return bool |
|
45 | - * @since 9.1 |
|
46 | - */ |
|
47 | - public function executeCheck($operator, $value); |
|
41 | + /** |
|
42 | + * @param string $operator |
|
43 | + * @param string $value |
|
44 | + * @return bool |
|
45 | + * @since 9.1 |
|
46 | + */ |
|
47 | + public function executeCheck($operator, $value); |
|
48 | 48 | |
49 | - /** |
|
50 | - * @param string $operator |
|
51 | - * @param string $value |
|
52 | - * @throws \UnexpectedValueException |
|
53 | - * @since 9.1 |
|
54 | - */ |
|
55 | - public function validateCheck($operator, $value); |
|
49 | + /** |
|
50 | + * @param string $operator |
|
51 | + * @param string $value |
|
52 | + * @throws \UnexpectedValueException |
|
53 | + * @since 9.1 |
|
54 | + */ |
|
55 | + public function validateCheck($operator, $value); |
|
56 | 56 | } |