Nextcloud PHP API (master)

OCMCapabilities
in package
implements JsonSerializable

FinalYes

Immutable representation of an OCM provider's capabilities.

Capabilities are advertised by remote OCM peers via the discovery document and indicate which optional features the peer implements (e.g. exchange-token, notifications, ...). Use the named has*() methods for the capabilities defined by the OCM spec, or has() for arbitrary capability strings.

Tags
link
https://github.com/cs3org/OCM-API/
since
33.0.0
Attributes
#[Consumable]
$since: '33.0.0'

Table of Contents

Interfaces

JsonSerializable

Properties

$capabilities  : array<int, string>

Methods

__construct()  : mixed
has()  : bool
Whether a specific capability is advertised. Convenience for callers that deal with capabilities not covered by a named `has*()` method.
hasExchangeToken()  : bool
Whether the peer implements the OCM token-exchange flow (refresh token → short-lived access token).
hasInviteAccepted()  : bool
Whether the peer accepts OCM invitation flow `invite-accepted` callbacks.
hasNotifications()  : bool
Whether the peer accepts OCM share notifications.
hasShares()  : bool
Whether the peer accepts incoming federated shares.
jsonSerialize()  : array<int, string>
toArray()  : array<int, string>
Raw list of advertised capability strings (normalized).

Properties

$capabilities read-only

private array<int, string> $capabilities

normalized (lowercased, no leading slash) capability strings

Methods

__construct()

public __construct([array<int, string> $capabilities = [] ]) : mixed
Parameters
$capabilities : array<int, string> = []
Tags
since
33.0.0

has()

Whether a specific capability is advertised. Convenience for callers that deal with capabilities not covered by a named `has*()` method.

public has(string $capability) : bool
Parameters
$capability : string
Tags
since
33.0.0
Return values
bool

hasExchangeToken()

Whether the peer implements the OCM token-exchange flow (refresh token → short-lived access token).

public hasExchangeToken() : bool
Tags
since
33.0.0
Return values
bool

hasInviteAccepted()

Whether the peer accepts OCM invitation flow `invite-accepted` callbacks.

public hasInviteAccepted() : bool
Tags
since
33.0.0
Return values
bool

hasNotifications()

Whether the peer accepts OCM share notifications.

public hasNotifications() : bool
Tags
since
33.0.0
Return values
bool

hasShares()

Whether the peer accepts incoming federated shares.

public hasShares() : bool
Tags
since
33.0.0
Return values
bool

jsonSerialize()

public jsonSerialize() : array<int, string>
Tags
since
33.0.0
Attributes
#[Override]
Return values
array<int, string>

toArray()

Raw list of advertised capability strings (normalized).

public toArray() : array<int, string>
Tags
since
33.0.0
Return values
array<int, string>
On this page

Search results