aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Share
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2024-07-12 10:41:41 +0200
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-07-12 20:14:30 +0200
commit9b84831c8d0c1d715cd42fa3e4e01ac8a59fa369 (patch)
treee39514c2cd1e51150075dff10c36c664d2d53ab2 /lib/public/Share
parent62defbd6b4dded5cdb4d76efe947231cc310263b (diff)
downloadnextcloud-server-9b84831c8d0c1d715cd42fa3e4e01ac8a59fa369.tar.gz
nextcloud-server-9b84831c8d0c1d715cd42fa3e4e01ac8a59fa369.zip
fix(files_sharing): adjust IAttributes API and files_versions
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'lib/public/Share')
-rw-r--r--lib/public/Share/IAttributes.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/public/Share/IAttributes.php b/lib/public/Share/IAttributes.php
index cb68cc9ebb3..fad19c60aad 100644
--- a/lib/public/Share/IAttributes.php
+++ b/lib/public/Share/IAttributes.php
@@ -13,7 +13,7 @@ namespace OCP\Share;
*/
interface IAttributes {
/**
- * Sets an attribute enabled/disabled. If the key did not exist before it will be created.
+ * Sets an attribute. If the key did not exist before it will be created.
*
* @param string $scope scope
* @param string $key key
@@ -21,10 +21,10 @@ interface IAttributes {
* @return IAttributes The modified object
* @since 25.0.0
*/
- public function setAttribute($scope, $key, $value);
+ public function setAttribute(string $scope, string $key, mixed $value): IAttributes;
/**
- * Returns if attribute is enabled/disabled for given scope id and key.
+ * Returns the attribute for given scope id and key.
* If attribute does not exist, returns null
*
* @param string $scope scope
@@ -32,7 +32,7 @@ interface IAttributes {
* @return bool|string|array|null
* @since 25.0.0
*/
- public function getAttribute($scope, $key);
+ public function getAttribute(string $scope, string $key): mixed;
/**
* Formats the IAttributes object to array with the following format:
@@ -40,13 +40,14 @@ interface IAttributes {
* 0 => [
* "scope" => <string>,
* "key" => <string>,
- * "enabled" => <bool>
+ * "value" => <bool|string|array|null>,
* ],
* ...
* ]
*
* @return array formatted IAttributes
* @since 25.0.0
+ * @since 30.0.0, `enabled` was renamed to `value`
*/
- public function toArray();
+ public function toArray(): array;
}