OCMCapabilities
in package
implements
JsonSerializable
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
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
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
Return values
boolhasExchangeToken()
Whether the peer implements the OCM token-exchange flow (refresh token → short-lived access token).
public
hasExchangeToken() : bool
Tags
Return values
boolhasInviteAccepted()
Whether the peer accepts OCM invitation flow `invite-accepted` callbacks.
public
hasInviteAccepted() : bool
Tags
Return values
boolhasNotifications()
Whether the peer accepts OCM share notifications.
public
hasNotifications() : bool
Tags
Return values
boolhasShares()
Whether the peer accepts incoming federated shares.
public
hasShares() : bool
Tags
Return values
booljsonSerialize()
public
jsonSerialize() : array<int, string>
Tags
Attributes
- #[Override]
Return values
array<int, string>toArray()
Raw list of advertised capability strings (normalized).
public
toArray() : array<int, string>