Nextcloud PHP API (master)

IAttributes
in

Interface IAttributes

Tags
since
25.0.0

Table of Contents

Methods

getAttribute()  : bool|null
Returns if attribute is enabled/disabled for given scope id and key.
setAttribute()  : IAttributes
Sets an attribute enabled/disabled. 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>, "enabled" => <bool> ], ... ]

Methods

getAttribute()

Returns if attribute is enabled/disabled for given scope id and key.

public getAttribute(string $scope, string $key) : bool|null

If attribute does not exist, returns null

Parameters
$scope : string

scope

$key : string

key

Tags
since
25.0.0
Return values
bool|null

setAttribute()

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

public setAttribute(string $scope, string $key, bool $enabled) : IAttributes
Parameters
$scope : string

scope

$key : string

key

$enabled : bool

enabled

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>, "enabled" => <bool> ], ... ]

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

formatted IAttributes


        
On this page

Search results