@@ -37,55 +37,55 @@ |
||
37 | 37 | * @since 8.1.0 |
38 | 38 | */ |
39 | 39 | interface IMemcache extends ICache { |
40 | - /** |
|
41 | - * Set a value in the cache if it's not already stored |
|
42 | - * |
|
43 | - * @param string $key |
|
44 | - * @param mixed $value |
|
45 | - * @param int $ttl Time To Live in seconds. Defaults to 60*60*24 |
|
46 | - * @return bool |
|
47 | - * @since 8.1.0 |
|
48 | - */ |
|
49 | - public function add($key, $value, $ttl = 0); |
|
40 | + /** |
|
41 | + * Set a value in the cache if it's not already stored |
|
42 | + * |
|
43 | + * @param string $key |
|
44 | + * @param mixed $value |
|
45 | + * @param int $ttl Time To Live in seconds. Defaults to 60*60*24 |
|
46 | + * @return bool |
|
47 | + * @since 8.1.0 |
|
48 | + */ |
|
49 | + public function add($key, $value, $ttl = 0); |
|
50 | 50 | |
51 | - /** |
|
52 | - * Increase a stored number |
|
53 | - * |
|
54 | - * @param string $key |
|
55 | - * @param int $step |
|
56 | - * @return int | bool |
|
57 | - * @since 8.1.0 |
|
58 | - */ |
|
59 | - public function inc($key, $step = 1); |
|
51 | + /** |
|
52 | + * Increase a stored number |
|
53 | + * |
|
54 | + * @param string $key |
|
55 | + * @param int $step |
|
56 | + * @return int | bool |
|
57 | + * @since 8.1.0 |
|
58 | + */ |
|
59 | + public function inc($key, $step = 1); |
|
60 | 60 | |
61 | - /** |
|
62 | - * Decrease a stored number |
|
63 | - * |
|
64 | - * @param string $key |
|
65 | - * @param int $step |
|
66 | - * @return int | bool |
|
67 | - * @since 8.1.0 |
|
68 | - */ |
|
69 | - public function dec($key, $step = 1); |
|
61 | + /** |
|
62 | + * Decrease a stored number |
|
63 | + * |
|
64 | + * @param string $key |
|
65 | + * @param int $step |
|
66 | + * @return int | bool |
|
67 | + * @since 8.1.0 |
|
68 | + */ |
|
69 | + public function dec($key, $step = 1); |
|
70 | 70 | |
71 | - /** |
|
72 | - * Compare and set |
|
73 | - * |
|
74 | - * @param string $key |
|
75 | - * @param mixed $old |
|
76 | - * @param mixed $new |
|
77 | - * @return bool |
|
78 | - * @since 8.1.0 |
|
79 | - */ |
|
80 | - public function cas($key, $old, $new); |
|
71 | + /** |
|
72 | + * Compare and set |
|
73 | + * |
|
74 | + * @param string $key |
|
75 | + * @param mixed $old |
|
76 | + * @param mixed $new |
|
77 | + * @return bool |
|
78 | + * @since 8.1.0 |
|
79 | + */ |
|
80 | + public function cas($key, $old, $new); |
|
81 | 81 | |
82 | - /** |
|
83 | - * Compare and delete |
|
84 | - * |
|
85 | - * @param string $key |
|
86 | - * @param mixed $old |
|
87 | - * @return bool |
|
88 | - * @since 8.1.0 |
|
89 | - */ |
|
90 | - public function cad($key, $old); |
|
82 | + /** |
|
83 | + * Compare and delete |
|
84 | + * |
|
85 | + * @param string $key |
|
86 | + * @param mixed $old |
|
87 | + * @return bool |
|
88 | + * @since 8.1.0 |
|
89 | + */ |
|
90 | + public function cad($key, $old); |
|
91 | 91 | } |
@@ -50,44 +50,44 @@ |
||
50 | 50 | * @since 4.5.0 |
51 | 51 | */ |
52 | 52 | class BackgroundJob { |
53 | - /** |
|
54 | - * get the execution type of background jobs |
|
55 | - * |
|
56 | - * @return string |
|
57 | - * |
|
58 | - * This method returns the type how background jobs are executed. If the user |
|
59 | - * did not select something, the type is ajax. |
|
60 | - * @since 5.0.0 |
|
61 | - */ |
|
62 | - public static function getExecutionType() { |
|
63 | - return \OC::$server->getConfig()->getAppValue('core', 'backgroundjobs_mode', 'ajax'); |
|
64 | - } |
|
53 | + /** |
|
54 | + * get the execution type of background jobs |
|
55 | + * |
|
56 | + * @return string |
|
57 | + * |
|
58 | + * This method returns the type how background jobs are executed. If the user |
|
59 | + * did not select something, the type is ajax. |
|
60 | + * @since 5.0.0 |
|
61 | + */ |
|
62 | + public static function getExecutionType() { |
|
63 | + return \OC::$server->getConfig()->getAppValue('core', 'backgroundjobs_mode', 'ajax'); |
|
64 | + } |
|
65 | 65 | |
66 | - /** |
|
67 | - * sets the background jobs execution type |
|
68 | - * |
|
69 | - * @param string $type execution type |
|
70 | - * @return false|null |
|
71 | - * |
|
72 | - * This method sets the execution type of the background jobs. Possible types |
|
73 | - * are "none", "ajax", "webcron", "cron" |
|
74 | - * @since 5.0.0 |
|
75 | - */ |
|
76 | - public static function setExecutionType($type) { |
|
77 | - if( !in_array( $type, array('none', 'ajax', 'webcron', 'cron'))) { |
|
78 | - return false; |
|
79 | - } |
|
80 | - \OC::$server->getConfig()->setAppValue('core', 'backgroundjobs_mode', $type); |
|
81 | - } |
|
66 | + /** |
|
67 | + * sets the background jobs execution type |
|
68 | + * |
|
69 | + * @param string $type execution type |
|
70 | + * @return false|null |
|
71 | + * |
|
72 | + * This method sets the execution type of the background jobs. Possible types |
|
73 | + * are "none", "ajax", "webcron", "cron" |
|
74 | + * @since 5.0.0 |
|
75 | + */ |
|
76 | + public static function setExecutionType($type) { |
|
77 | + if( !in_array( $type, array('none', 'ajax', 'webcron', 'cron'))) { |
|
78 | + return false; |
|
79 | + } |
|
80 | + \OC::$server->getConfig()->setAppValue('core', 'backgroundjobs_mode', $type); |
|
81 | + } |
|
82 | 82 | |
83 | - /** |
|
84 | - * @param string $job |
|
85 | - * @param mixed $argument |
|
86 | - * @deprecated 8.1.0 Use \OC::$server->getJobList()->add() instead |
|
87 | - * @since 6.0.0 |
|
88 | - */ |
|
89 | - public static function registerJob($job, $argument = null) { |
|
90 | - $jobList = \OC::$server->getJobList(); |
|
91 | - $jobList->add($job, $argument); |
|
92 | - } |
|
83 | + /** |
|
84 | + * @param string $job |
|
85 | + * @param mixed $argument |
|
86 | + * @deprecated 8.1.0 Use \OC::$server->getJobList()->add() instead |
|
87 | + * @since 6.0.0 |
|
88 | + */ |
|
89 | + public static function registerJob($job, $argument = null) { |
|
90 | + $jobList = \OC::$server->getJobList(); |
|
91 | + $jobList->add($job, $argument); |
|
92 | + } |
|
93 | 93 | } |
@@ -32,13 +32,13 @@ |
||
32 | 32 | */ |
33 | 33 | interface IFile { |
34 | 34 | |
35 | - /** |
|
36 | - * get list of users with access to the file |
|
37 | - * |
|
38 | - * @param string $path to the file |
|
39 | - * @return array |
|
40 | - * @since 8.1.0 |
|
41 | - */ |
|
42 | - public function getAccessList($path); |
|
35 | + /** |
|
36 | + * get list of users with access to the file |
|
37 | + * |
|
38 | + * @param string $path to the file |
|
39 | + * @return array |
|
40 | + * @since 8.1.0 |
|
41 | + */ |
|
42 | + public function getAccessList($path); |
|
43 | 43 | |
44 | 44 | } |
@@ -34,67 +34,67 @@ |
||
34 | 34 | */ |
35 | 35 | interface IManager { |
36 | 36 | |
37 | - /** |
|
38 | - * Check if encryption is available (at least one encryption module needs to be enabled) |
|
39 | - * |
|
40 | - * @return bool true if enabled, false if not |
|
41 | - * @since 8.1.0 |
|
42 | - */ |
|
43 | - public function isEnabled(); |
|
37 | + /** |
|
38 | + * Check if encryption is available (at least one encryption module needs to be enabled) |
|
39 | + * |
|
40 | + * @return bool true if enabled, false if not |
|
41 | + * @since 8.1.0 |
|
42 | + */ |
|
43 | + public function isEnabled(); |
|
44 | 44 | |
45 | - /** |
|
46 | - * Registers an callback function which must return an encryption module instance |
|
47 | - * |
|
48 | - * @param string $id |
|
49 | - * @param string $displayName |
|
50 | - * @param callable $callback |
|
51 | - * @throws ModuleAlreadyExistsException |
|
52 | - * @since 8.1.0 |
|
53 | - */ |
|
54 | - public function registerEncryptionModule($id, $displayName, callable $callback); |
|
45 | + /** |
|
46 | + * Registers an callback function which must return an encryption module instance |
|
47 | + * |
|
48 | + * @param string $id |
|
49 | + * @param string $displayName |
|
50 | + * @param callable $callback |
|
51 | + * @throws ModuleAlreadyExistsException |
|
52 | + * @since 8.1.0 |
|
53 | + */ |
|
54 | + public function registerEncryptionModule($id, $displayName, callable $callback); |
|
55 | 55 | |
56 | - /** |
|
57 | - * Unregisters an encryption module |
|
58 | - * |
|
59 | - * @param string $moduleId |
|
60 | - * @since 8.1.0 |
|
61 | - */ |
|
62 | - public function unregisterEncryptionModule($moduleId); |
|
56 | + /** |
|
57 | + * Unregisters an encryption module |
|
58 | + * |
|
59 | + * @param string $moduleId |
|
60 | + * @since 8.1.0 |
|
61 | + */ |
|
62 | + public function unregisterEncryptionModule($moduleId); |
|
63 | 63 | |
64 | - /** |
|
65 | - * get a list of all encryption modules |
|
66 | - * |
|
67 | - * @return array [id => ['id' => $id, 'displayName' => $displayName, 'callback' => callback]] |
|
68 | - * @since 8.1.0 |
|
69 | - */ |
|
70 | - public function getEncryptionModules(); |
|
64 | + /** |
|
65 | + * get a list of all encryption modules |
|
66 | + * |
|
67 | + * @return array [id => ['id' => $id, 'displayName' => $displayName, 'callback' => callback]] |
|
68 | + * @since 8.1.0 |
|
69 | + */ |
|
70 | + public function getEncryptionModules(); |
|
71 | 71 | |
72 | 72 | |
73 | - /** |
|
74 | - * get a specific encryption module |
|
75 | - * |
|
76 | - * @param string $moduleId Empty to get the default module |
|
77 | - * @return IEncryptionModule |
|
78 | - * @throws ModuleDoesNotExistsException |
|
79 | - * @since 8.1.0 |
|
80 | - */ |
|
81 | - public function getEncryptionModule($moduleId = ''); |
|
73 | + /** |
|
74 | + * get a specific encryption module |
|
75 | + * |
|
76 | + * @param string $moduleId Empty to get the default module |
|
77 | + * @return IEncryptionModule |
|
78 | + * @throws ModuleDoesNotExistsException |
|
79 | + * @since 8.1.0 |
|
80 | + */ |
|
81 | + public function getEncryptionModule($moduleId = ''); |
|
82 | 82 | |
83 | - /** |
|
84 | - * get default encryption module Id |
|
85 | - * |
|
86 | - * @return string |
|
87 | - * @since 8.1.0 |
|
88 | - */ |
|
89 | - public function getDefaultEncryptionModuleId(); |
|
83 | + /** |
|
84 | + * get default encryption module Id |
|
85 | + * |
|
86 | + * @return string |
|
87 | + * @since 8.1.0 |
|
88 | + */ |
|
89 | + public function getDefaultEncryptionModuleId(); |
|
90 | 90 | |
91 | - /** |
|
92 | - * set default encryption module Id |
|
93 | - * |
|
94 | - * @param string $moduleId |
|
95 | - * @return string |
|
96 | - * @since 8.1.0 |
|
97 | - */ |
|
98 | - public function setDefaultEncryptionModule($moduleId); |
|
91 | + /** |
|
92 | + * set default encryption module Id |
|
93 | + * |
|
94 | + * @param string $moduleId |
|
95 | + * @return string |
|
96 | + * @since 8.1.0 |
|
97 | + */ |
|
98 | + public function setDefaultEncryptionModule($moduleId); |
|
99 | 99 | |
100 | 100 | } |
@@ -33,151 +33,151 @@ |
||
33 | 33 | */ |
34 | 34 | interface IStorage { |
35 | 35 | |
36 | - /** |
|
37 | - * get user specific key |
|
38 | - * |
|
39 | - * @param string $uid ID if the user for whom we want the key |
|
40 | - * @param string $keyId id of the key |
|
41 | - * @param string $encryptionModuleId |
|
42 | - * |
|
43 | - * @return mixed key |
|
44 | - * @since 8.1.0 |
|
45 | - */ |
|
46 | - public function getUserKey($uid, $keyId, $encryptionModuleId); |
|
36 | + /** |
|
37 | + * get user specific key |
|
38 | + * |
|
39 | + * @param string $uid ID if the user for whom we want the key |
|
40 | + * @param string $keyId id of the key |
|
41 | + * @param string $encryptionModuleId |
|
42 | + * |
|
43 | + * @return mixed key |
|
44 | + * @since 8.1.0 |
|
45 | + */ |
|
46 | + public function getUserKey($uid, $keyId, $encryptionModuleId); |
|
47 | 47 | |
48 | - /** |
|
49 | - * get file specific key |
|
50 | - * |
|
51 | - * @param string $path path to file |
|
52 | - * @param string $keyId id of the key |
|
53 | - * @param string $encryptionModuleId |
|
54 | - * |
|
55 | - * @return mixed key |
|
56 | - * @since 8.1.0 |
|
57 | - */ |
|
58 | - public function getFileKey($path, $keyId, $encryptionModuleId); |
|
48 | + /** |
|
49 | + * get file specific key |
|
50 | + * |
|
51 | + * @param string $path path to file |
|
52 | + * @param string $keyId id of the key |
|
53 | + * @param string $encryptionModuleId |
|
54 | + * |
|
55 | + * @return mixed key |
|
56 | + * @since 8.1.0 |
|
57 | + */ |
|
58 | + public function getFileKey($path, $keyId, $encryptionModuleId); |
|
59 | 59 | |
60 | - /** |
|
61 | - * get system-wide encryption keys not related to a specific user, |
|
62 | - * e.g something like a key for public link shares |
|
63 | - * |
|
64 | - * @param string $keyId id of the key |
|
65 | - * @param string $encryptionModuleId |
|
66 | - * |
|
67 | - * @return mixed key |
|
68 | - * @since 8.1.0 |
|
69 | - */ |
|
70 | - public function getSystemUserKey($keyId, $encryptionModuleId); |
|
60 | + /** |
|
61 | + * get system-wide encryption keys not related to a specific user, |
|
62 | + * e.g something like a key for public link shares |
|
63 | + * |
|
64 | + * @param string $keyId id of the key |
|
65 | + * @param string $encryptionModuleId |
|
66 | + * |
|
67 | + * @return mixed key |
|
68 | + * @since 8.1.0 |
|
69 | + */ |
|
70 | + public function getSystemUserKey($keyId, $encryptionModuleId); |
|
71 | 71 | |
72 | - /** |
|
73 | - * set user specific key |
|
74 | - * |
|
75 | - * @param string $uid ID if the user for whom we want the key |
|
76 | - * @param string $keyId id of the key |
|
77 | - * @param mixed $key |
|
78 | - * @param string $encryptionModuleId |
|
79 | - * @since 8.1.0 |
|
80 | - */ |
|
81 | - public function setUserKey($uid, $keyId, $key, $encryptionModuleId); |
|
72 | + /** |
|
73 | + * set user specific key |
|
74 | + * |
|
75 | + * @param string $uid ID if the user for whom we want the key |
|
76 | + * @param string $keyId id of the key |
|
77 | + * @param mixed $key |
|
78 | + * @param string $encryptionModuleId |
|
79 | + * @since 8.1.0 |
|
80 | + */ |
|
81 | + public function setUserKey($uid, $keyId, $key, $encryptionModuleId); |
|
82 | 82 | |
83 | - /** |
|
84 | - * set file specific key |
|
85 | - * |
|
86 | - * @param string $path path to file |
|
87 | - * @param string $keyId id of the key |
|
88 | - * @param mixed $key |
|
89 | - * @param string $encryptionModuleId |
|
90 | - * @since 8.1.0 |
|
91 | - */ |
|
92 | - public function setFileKey($path, $keyId, $key, $encryptionModuleId); |
|
83 | + /** |
|
84 | + * set file specific key |
|
85 | + * |
|
86 | + * @param string $path path to file |
|
87 | + * @param string $keyId id of the key |
|
88 | + * @param mixed $key |
|
89 | + * @param string $encryptionModuleId |
|
90 | + * @since 8.1.0 |
|
91 | + */ |
|
92 | + public function setFileKey($path, $keyId, $key, $encryptionModuleId); |
|
93 | 93 | |
94 | - /** |
|
95 | - * set system-wide encryption keys not related to a specific user, |
|
96 | - * e.g something like a key for public link shares |
|
97 | - * |
|
98 | - * @param string $keyId id of the key |
|
99 | - * @param mixed $key |
|
100 | - * @param string $encryptionModuleId |
|
101 | - * |
|
102 | - * @return mixed key |
|
103 | - * @since 8.1.0 |
|
104 | - */ |
|
105 | - public function setSystemUserKey($keyId, $key, $encryptionModuleId); |
|
94 | + /** |
|
95 | + * set system-wide encryption keys not related to a specific user, |
|
96 | + * e.g something like a key for public link shares |
|
97 | + * |
|
98 | + * @param string $keyId id of the key |
|
99 | + * @param mixed $key |
|
100 | + * @param string $encryptionModuleId |
|
101 | + * |
|
102 | + * @return mixed key |
|
103 | + * @since 8.1.0 |
|
104 | + */ |
|
105 | + public function setSystemUserKey($keyId, $key, $encryptionModuleId); |
|
106 | 106 | |
107 | - /** |
|
108 | - * delete user specific key |
|
109 | - * |
|
110 | - * @param string $uid ID if the user for whom we want to delete the key |
|
111 | - * @param string $keyId id of the key |
|
112 | - * @param string $encryptionModuleId |
|
113 | - * |
|
114 | - * @return boolean False when the key could not be deleted |
|
115 | - * @since 8.1.0 |
|
116 | - */ |
|
117 | - public function deleteUserKey($uid, $keyId, $encryptionModuleId); |
|
107 | + /** |
|
108 | + * delete user specific key |
|
109 | + * |
|
110 | + * @param string $uid ID if the user for whom we want to delete the key |
|
111 | + * @param string $keyId id of the key |
|
112 | + * @param string $encryptionModuleId |
|
113 | + * |
|
114 | + * @return boolean False when the key could not be deleted |
|
115 | + * @since 8.1.0 |
|
116 | + */ |
|
117 | + public function deleteUserKey($uid, $keyId, $encryptionModuleId); |
|
118 | 118 | |
119 | - /** |
|
120 | - * delete file specific key |
|
121 | - * |
|
122 | - * @param string $path path to file |
|
123 | - * @param string $keyId id of the key |
|
124 | - * @param string $encryptionModuleId |
|
125 | - * |
|
126 | - * @return boolean False when the key could not be deleted |
|
127 | - * @since 8.1.0 |
|
128 | - */ |
|
129 | - public function deleteFileKey($path, $keyId, $encryptionModuleId); |
|
119 | + /** |
|
120 | + * delete file specific key |
|
121 | + * |
|
122 | + * @param string $path path to file |
|
123 | + * @param string $keyId id of the key |
|
124 | + * @param string $encryptionModuleId |
|
125 | + * |
|
126 | + * @return boolean False when the key could not be deleted |
|
127 | + * @since 8.1.0 |
|
128 | + */ |
|
129 | + public function deleteFileKey($path, $keyId, $encryptionModuleId); |
|
130 | 130 | |
131 | - /** |
|
132 | - * delete all file keys for a given file |
|
133 | - * |
|
134 | - * @param string $path to the file |
|
135 | - * |
|
136 | - * @return boolean False when the keys could not be deleted |
|
137 | - * @since 8.1.0 |
|
138 | - */ |
|
139 | - public function deleteAllFileKeys($path); |
|
131 | + /** |
|
132 | + * delete all file keys for a given file |
|
133 | + * |
|
134 | + * @param string $path to the file |
|
135 | + * |
|
136 | + * @return boolean False when the keys could not be deleted |
|
137 | + * @since 8.1.0 |
|
138 | + */ |
|
139 | + public function deleteAllFileKeys($path); |
|
140 | 140 | |
141 | - /** |
|
142 | - * delete system-wide encryption keys not related to a specific user, |
|
143 | - * e.g something like a key for public link shares |
|
144 | - * |
|
145 | - * @param string $keyId id of the key |
|
146 | - * @param string $encryptionModuleId |
|
147 | - * |
|
148 | - * @return boolean False when the key could not be deleted |
|
149 | - * @since 8.1.0 |
|
150 | - */ |
|
151 | - public function deleteSystemUserKey($keyId, $encryptionModuleId); |
|
141 | + /** |
|
142 | + * delete system-wide encryption keys not related to a specific user, |
|
143 | + * e.g something like a key for public link shares |
|
144 | + * |
|
145 | + * @param string $keyId id of the key |
|
146 | + * @param string $encryptionModuleId |
|
147 | + * |
|
148 | + * @return boolean False when the key could not be deleted |
|
149 | + * @since 8.1.0 |
|
150 | + */ |
|
151 | + public function deleteSystemUserKey($keyId, $encryptionModuleId); |
|
152 | 152 | |
153 | - /** |
|
154 | - * copy keys if a file was renamed |
|
155 | - * |
|
156 | - * @param string $source |
|
157 | - * @param string $target |
|
158 | - * @return boolean |
|
159 | - * @since 8.1.0 |
|
160 | - */ |
|
161 | - public function renameKeys($source, $target); |
|
153 | + /** |
|
154 | + * copy keys if a file was renamed |
|
155 | + * |
|
156 | + * @param string $source |
|
157 | + * @param string $target |
|
158 | + * @return boolean |
|
159 | + * @since 8.1.0 |
|
160 | + */ |
|
161 | + public function renameKeys($source, $target); |
|
162 | 162 | |
163 | - /** |
|
164 | - * move keys if a file was renamed |
|
165 | - * |
|
166 | - * @param string $source |
|
167 | - * @param string $target |
|
168 | - * @return boolean |
|
169 | - * @since 8.1.0 |
|
170 | - */ |
|
171 | - public function copyKeys($source, $target); |
|
163 | + /** |
|
164 | + * move keys if a file was renamed |
|
165 | + * |
|
166 | + * @param string $source |
|
167 | + * @param string $target |
|
168 | + * @return boolean |
|
169 | + * @since 8.1.0 |
|
170 | + */ |
|
171 | + public function copyKeys($source, $target); |
|
172 | 172 | |
173 | - /** |
|
174 | - * backup keys of a given encryption module |
|
175 | - * |
|
176 | - * @param string $encryptionModuleId |
|
177 | - * @param string $purpose |
|
178 | - * @param string $uid |
|
179 | - * @return bool |
|
180 | - * @since 12.0.0 |
|
181 | - */ |
|
182 | - public function backupUserKeys($encryptionModuleId, $purpose, $uid); |
|
173 | + /** |
|
174 | + * backup keys of a given encryption module |
|
175 | + * |
|
176 | + * @param string $encryptionModuleId |
|
177 | + * @param string $purpose |
|
178 | + * @param string $uid |
|
179 | + * @return bool |
|
180 | + * @since 12.0.0 |
|
181 | + */ |
|
182 | + public function backupUserKeys($encryptionModuleId, $purpose, $uid); |
|
183 | 183 | } |
@@ -35,46 +35,46 @@ |
||
35 | 35 | */ |
36 | 36 | interface IAvatar { |
37 | 37 | |
38 | - /** |
|
39 | - * get the users avatar |
|
40 | - * @param int $size size in px of the avatar, avatars are square, defaults to 64, -1 can be used to not scale the image |
|
41 | - * @return boolean|\OCP\IImage containing the avatar or false if there's no image |
|
42 | - * @since 6.0.0 - size of -1 was added in 9.0.0 |
|
43 | - */ |
|
44 | - public function get($size = 64); |
|
38 | + /** |
|
39 | + * get the users avatar |
|
40 | + * @param int $size size in px of the avatar, avatars are square, defaults to 64, -1 can be used to not scale the image |
|
41 | + * @return boolean|\OCP\IImage containing the avatar or false if there's no image |
|
42 | + * @since 6.0.0 - size of -1 was added in 9.0.0 |
|
43 | + */ |
|
44 | + public function get($size = 64); |
|
45 | 45 | |
46 | - /** |
|
47 | - * Check if an avatar exists for the user |
|
48 | - * |
|
49 | - * @return bool |
|
50 | - * @since 8.1.0 |
|
51 | - */ |
|
52 | - public function exists(); |
|
46 | + /** |
|
47 | + * Check if an avatar exists for the user |
|
48 | + * |
|
49 | + * @return bool |
|
50 | + * @since 8.1.0 |
|
51 | + */ |
|
52 | + public function exists(); |
|
53 | 53 | |
54 | - /** |
|
55 | - * sets the users avatar |
|
56 | - * @param \OCP\IImage|resource|string $data An image object, imagedata or path to set a new avatar |
|
57 | - * @throws \Exception if the provided file is not a jpg or png image |
|
58 | - * @throws \Exception if the provided image is not valid |
|
59 | - * @throws \OC\NotSquareException if the image is not square |
|
60 | - * @return void |
|
61 | - * @since 6.0.0 |
|
62 | - */ |
|
63 | - public function set($data); |
|
54 | + /** |
|
55 | + * sets the users avatar |
|
56 | + * @param \OCP\IImage|resource|string $data An image object, imagedata or path to set a new avatar |
|
57 | + * @throws \Exception if the provided file is not a jpg or png image |
|
58 | + * @throws \Exception if the provided image is not valid |
|
59 | + * @throws \OC\NotSquareException if the image is not square |
|
60 | + * @return void |
|
61 | + * @since 6.0.0 |
|
62 | + */ |
|
63 | + public function set($data); |
|
64 | 64 | |
65 | - /** |
|
66 | - * remove the users avatar |
|
67 | - * @return void |
|
68 | - * @since 6.0.0 |
|
69 | - */ |
|
70 | - public function remove(); |
|
65 | + /** |
|
66 | + * remove the users avatar |
|
67 | + * @return void |
|
68 | + * @since 6.0.0 |
|
69 | + */ |
|
70 | + public function remove(); |
|
71 | 71 | |
72 | - /** |
|
73 | - * Get the file of the avatar |
|
74 | - * @param int $size -1 can be used to not scale the image |
|
75 | - * @return File |
|
76 | - * @throws NotFoundException |
|
77 | - * @since 9.0.0 |
|
78 | - */ |
|
79 | - public function getFile($size); |
|
72 | + /** |
|
73 | + * Get the file of the avatar |
|
74 | + * @param int $size -1 can be used to not scale the image |
|
75 | + * @return File |
|
76 | + * @throws NotFoundException |
|
77 | + * @since 9.0.0 |
|
78 | + */ |
|
79 | + public function getFile($size); |
|
80 | 80 | } |
@@ -33,46 +33,46 @@ |
||
33 | 33 | */ |
34 | 34 | interface ISearch { |
35 | 35 | |
36 | - /** |
|
37 | - * Search all providers for $query |
|
38 | - * @param string $query |
|
39 | - * @param string[] $inApps optionally limit results to the given apps |
|
40 | - * @return array An array of OCP\Search\Result's |
|
41 | - * @deprecated 8.0.0 use searchPaged() with page and size |
|
42 | - * @since 7.0.0 - parameter $inApps was added in 8.0.0 |
|
43 | - */ |
|
44 | - public function search($query, array $inApps = array()); |
|
36 | + /** |
|
37 | + * Search all providers for $query |
|
38 | + * @param string $query |
|
39 | + * @param string[] $inApps optionally limit results to the given apps |
|
40 | + * @return array An array of OCP\Search\Result's |
|
41 | + * @deprecated 8.0.0 use searchPaged() with page and size |
|
42 | + * @since 7.0.0 - parameter $inApps was added in 8.0.0 |
|
43 | + */ |
|
44 | + public function search($query, array $inApps = array()); |
|
45 | 45 | |
46 | - /** |
|
47 | - * Search all providers for $query |
|
48 | - * @param string $query |
|
49 | - * @param string[] $inApps optionally limit results to the given apps |
|
50 | - * @param int $page pages start at page 1 |
|
51 | - * @param int $size |
|
52 | - * @return array An array of OCP\Search\Result's |
|
53 | - * @since 8.0.0 |
|
54 | - */ |
|
55 | - public function searchPaged($query, array $inApps = array(), $page = 1, $size = 30); |
|
46 | + /** |
|
47 | + * Search all providers for $query |
|
48 | + * @param string $query |
|
49 | + * @param string[] $inApps optionally limit results to the given apps |
|
50 | + * @param int $page pages start at page 1 |
|
51 | + * @param int $size |
|
52 | + * @return array An array of OCP\Search\Result's |
|
53 | + * @since 8.0.0 |
|
54 | + */ |
|
55 | + public function searchPaged($query, array $inApps = array(), $page = 1, $size = 30); |
|
56 | 56 | |
57 | - /** |
|
58 | - * Register a new search provider to search with |
|
59 | - * @param string $class class name of a OCP\Search\Provider |
|
60 | - * @param array $options optional |
|
61 | - * @since 7.0.0 |
|
62 | - */ |
|
63 | - public function registerProvider($class, array $options = array()); |
|
57 | + /** |
|
58 | + * Register a new search provider to search with |
|
59 | + * @param string $class class name of a OCP\Search\Provider |
|
60 | + * @param array $options optional |
|
61 | + * @since 7.0.0 |
|
62 | + */ |
|
63 | + public function registerProvider($class, array $options = array()); |
|
64 | 64 | |
65 | - /** |
|
66 | - * Remove one existing search provider |
|
67 | - * @param string $provider class name of a OCP\Search\Provider |
|
68 | - * @since 7.0.0 |
|
69 | - */ |
|
70 | - public function removeProvider($provider); |
|
65 | + /** |
|
66 | + * Remove one existing search provider |
|
67 | + * @param string $provider class name of a OCP\Search\Provider |
|
68 | + * @since 7.0.0 |
|
69 | + */ |
|
70 | + public function removeProvider($provider); |
|
71 | 71 | |
72 | - /** |
|
73 | - * Remove all registered search providers |
|
74 | - * @since 7.0.0 |
|
75 | - */ |
|
76 | - public function clearProviders(); |
|
72 | + /** |
|
73 | + * Remove all registered search providers |
|
74 | + * @since 7.0.0 |
|
75 | + */ |
|
76 | + public function clearProviders(); |
|
77 | 77 | |
78 | 78 | } |
@@ -29,41 +29,41 @@ |
||
29 | 29 | */ |
30 | 30 | interface ISystemTag { |
31 | 31 | |
32 | - /** |
|
33 | - * Returns the tag id |
|
34 | - * |
|
35 | - * @return string id |
|
36 | - * |
|
37 | - * @since 9.0.0 |
|
38 | - */ |
|
39 | - public function getId(); |
|
32 | + /** |
|
33 | + * Returns the tag id |
|
34 | + * |
|
35 | + * @return string id |
|
36 | + * |
|
37 | + * @since 9.0.0 |
|
38 | + */ |
|
39 | + public function getId(); |
|
40 | 40 | |
41 | - /** |
|
42 | - * Returns the tag display name |
|
43 | - * |
|
44 | - * @return string tag display name |
|
45 | - * |
|
46 | - * @since 9.0.0 |
|
47 | - */ |
|
48 | - public function getName(); |
|
41 | + /** |
|
42 | + * Returns the tag display name |
|
43 | + * |
|
44 | + * @return string tag display name |
|
45 | + * |
|
46 | + * @since 9.0.0 |
|
47 | + */ |
|
48 | + public function getName(); |
|
49 | 49 | |
50 | - /** |
|
51 | - * Returns whether the tag is visible for regular users |
|
52 | - * |
|
53 | - * @return bool true if visible, false otherwise |
|
54 | - * |
|
55 | - * @since 9.0.0 |
|
56 | - */ |
|
57 | - public function isUserVisible(); |
|
50 | + /** |
|
51 | + * Returns whether the tag is visible for regular users |
|
52 | + * |
|
53 | + * @return bool true if visible, false otherwise |
|
54 | + * |
|
55 | + * @since 9.0.0 |
|
56 | + */ |
|
57 | + public function isUserVisible(); |
|
58 | 58 | |
59 | - /** |
|
60 | - * Returns whether the tag can be assigned to objects by regular users |
|
61 | - * |
|
62 | - * @return bool true if assignable, false otherwise |
|
63 | - * |
|
64 | - * @since 9.0.0 |
|
65 | - */ |
|
66 | - public function isUserAssignable(); |
|
59 | + /** |
|
60 | + * Returns whether the tag can be assigned to objects by regular users |
|
61 | + * |
|
62 | + * @return bool true if assignable, false otherwise |
|
63 | + * |
|
64 | + * @since 9.0.0 |
|
65 | + */ |
|
66 | + public function isUserAssignable(); |
|
67 | 67 | |
68 | 68 | } |
69 | 69 |
@@ -32,63 +32,63 @@ |
||
32 | 32 | */ |
33 | 33 | class MapperEvent extends Event { |
34 | 34 | |
35 | - const EVENT_ASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::assignTags'; |
|
36 | - const EVENT_UNASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::unassignTags'; |
|
35 | + const EVENT_ASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::assignTags'; |
|
36 | + const EVENT_UNASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::unassignTags'; |
|
37 | 37 | |
38 | - /** @var string */ |
|
39 | - protected $event; |
|
40 | - /** @var string */ |
|
41 | - protected $objectType; |
|
42 | - /** @var string */ |
|
43 | - protected $objectId; |
|
44 | - /** @var int[] */ |
|
45 | - protected $tags; |
|
38 | + /** @var string */ |
|
39 | + protected $event; |
|
40 | + /** @var string */ |
|
41 | + protected $objectType; |
|
42 | + /** @var string */ |
|
43 | + protected $objectId; |
|
44 | + /** @var int[] */ |
|
45 | + protected $tags; |
|
46 | 46 | |
47 | - /** |
|
48 | - * DispatcherEvent constructor. |
|
49 | - * |
|
50 | - * @param string $event |
|
51 | - * @param string $objectType |
|
52 | - * @param string $objectId |
|
53 | - * @param int[] $tags |
|
54 | - * @since 9.0.0 |
|
55 | - */ |
|
56 | - public function __construct($event, $objectType, $objectId, array $tags) { |
|
57 | - $this->event = $event; |
|
58 | - $this->objectType = $objectType; |
|
59 | - $this->objectId = $objectId; |
|
60 | - $this->tags = $tags; |
|
61 | - } |
|
47 | + /** |
|
48 | + * DispatcherEvent constructor. |
|
49 | + * |
|
50 | + * @param string $event |
|
51 | + * @param string $objectType |
|
52 | + * @param string $objectId |
|
53 | + * @param int[] $tags |
|
54 | + * @since 9.0.0 |
|
55 | + */ |
|
56 | + public function __construct($event, $objectType, $objectId, array $tags) { |
|
57 | + $this->event = $event; |
|
58 | + $this->objectType = $objectType; |
|
59 | + $this->objectId = $objectId; |
|
60 | + $this->tags = $tags; |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * @return string |
|
65 | - * @since 9.0.0 |
|
66 | - */ |
|
67 | - public function getEvent() { |
|
68 | - return $this->event; |
|
69 | - } |
|
63 | + /** |
|
64 | + * @return string |
|
65 | + * @since 9.0.0 |
|
66 | + */ |
|
67 | + public function getEvent() { |
|
68 | + return $this->event; |
|
69 | + } |
|
70 | 70 | |
71 | - /** |
|
72 | - * @return string |
|
73 | - * @since 9.0.0 |
|
74 | - */ |
|
75 | - public function getObjectType() { |
|
76 | - return $this->objectType; |
|
77 | - } |
|
71 | + /** |
|
72 | + * @return string |
|
73 | + * @since 9.0.0 |
|
74 | + */ |
|
75 | + public function getObjectType() { |
|
76 | + return $this->objectType; |
|
77 | + } |
|
78 | 78 | |
79 | - /** |
|
80 | - * @return string |
|
81 | - * @since 9.0.0 |
|
82 | - */ |
|
83 | - public function getObjectId() { |
|
84 | - return $this->objectId; |
|
85 | - } |
|
79 | + /** |
|
80 | + * @return string |
|
81 | + * @since 9.0.0 |
|
82 | + */ |
|
83 | + public function getObjectId() { |
|
84 | + return $this->objectId; |
|
85 | + } |
|
86 | 86 | |
87 | - /** |
|
88 | - * @return int[] |
|
89 | - * @since 9.0.0 |
|
90 | - */ |
|
91 | - public function getTags() { |
|
92 | - return $this->tags; |
|
93 | - } |
|
87 | + /** |
|
88 | + * @return int[] |
|
89 | + * @since 9.0.0 |
|
90 | + */ |
|
91 | + public function getTags() { |
|
92 | + return $this->tags; |
|
93 | + } |
|
94 | 94 | } |