Nextcloud PHP API (master)

IAttributes
in

Interface IAttributes

Tags
since
25.0.0

Table of Contents

Methods

getAttribute()  : bool|string|array<string|int, mixed>|null
Returns the attribute for given scope id and key.
setAttribute()  : IAttributes
Sets an attribute. If the key did not exist before it will be created.
toArray()  : array<string|int, mixed>
Formats the IAttributes object to array with the following format: [ 0 => [ "scope" => <string>, "key" => <string>, "value" => <bool|string|array|null>, ], ... ]

Methods

getAttribute()

Returns the attribute for given scope id and key.

public getAttribute(string $scope, string $key) : bool|string|array<string|int, mixed>|null

If attribute does not exist, returns null

Parameters
$scope : string

scope

$key : string

key

Tags
since
25.0.0
Return values
bool|string|array<string|int, mixed>|null

setAttribute()

Sets an attribute. If the key did not exist before it will be created.

public setAttribute(string $scope, string $key, bool|string|array<string|int, mixed>|null $value) : IAttributes
Parameters
$scope : string

scope

$key : string

key

$value : bool|string|array<string|int, mixed>|null

value

Tags
since
25.0.0
Return values
IAttributes

The modified object

toArray()

Formats the IAttributes object to array with the following format: [ 0 => [ "scope" => <string>, "key" => <string>, "value" => <bool|string|array|null>, ], ... ]

public toArray() : array<string|int, mixed>
Tags
since
25.0.0
since
30.0.0,

enabled was renamed to value

Return values
array<string|int, mixed>

formatted IAttributes


        
On this page

Search results