Nextcloud PHP API (master)

OpenAPI
in package

With this attribute a controller or a method can be moved into a different scope or tag. Scopes should be seen as API consumers, tags can be used to group different routes inside the same scope.

Tags
since
28.0.0
Attributes
#[Attribute]
\Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE

Table of Contents

Constants

SCOPE_ADMINISTRATION  = 'administration'
APIs used to administrate your app's configuration on an administrative level.
SCOPE_DEFAULT  = 'default'
APIs used for normal user facing interaction with your app, e.g. when you would implement a mobile client or standalone frontend.
SCOPE_EX_APP  = 'ex_app'
APIs used by ExApps.
SCOPE_FEDERATION  = 'federation'
APIs used by servers to federate with each other.
SCOPE_IGNORE  = 'ignore'
Ignore this controller or method in all generated OpenAPI specifications.

Properties

$scope  : string
$tags  : array<string|int, mixed>|null

Methods

__construct()  : mixed
getScope()  : string
getTags()  : array<int, string>|null

Constants

SCOPE_ADMINISTRATION

APIs used to administrate your app's configuration on an administrative level.

public mixed SCOPE_ADMINISTRATION = 'administration'

Will be set automatically when admin permissions are required to access the route.

Tags
since
28.0.0

SCOPE_DEFAULT

APIs used for normal user facing interaction with your app, e.g. when you would implement a mobile client or standalone frontend.

public mixed SCOPE_DEFAULT = 'default'
Tags
since
28.0.0

SCOPE_EX_APP

APIs used by ExApps.

public mixed SCOPE_EX_APP = 'ex_app'

Will be set automatically when an ExApp is required to access the route.

Tags
since
30.0.0

SCOPE_FEDERATION

APIs used by servers to federate with each other.

public mixed SCOPE_FEDERATION = 'federation'
Tags
since
28.0.0

SCOPE_IGNORE

Ignore this controller or method in all generated OpenAPI specifications.

public mixed SCOPE_IGNORE = 'ignore'
Tags
since
28.0.0

Properties

$scope

protected string $scope = self::SCOPE_DEFAULT

$tags

protected array<string|int, mixed>|null $tags = null

Methods

__construct()

public __construct([self::SCOPE_*|string $scope = self::SCOPE_DEFAULT ][, array<int, string>|null $tags = null ]) : mixed
Parameters
$scope : self::SCOPE_*|string = self::SCOPE_DEFAULT

Scopes are used to define different clients. It is recommended to go with the scopes available as self::SCOPE_* constants, but in exotic cases other APIs might need documentation as well, then a free string can be provided (but it should be a-z only).

$tags : array<int, string>|null = null

Tags can be used to group routes inside a scope for easier implementation and reviewing of the API specification. It defaults to the controller name in snake_case (should be a-z and underscore only).

Tags
since
28.0.0

getScope()

public getScope() : string
Tags
since
28.0.0
Return values
string

getTags()

public getTags() : array<int, string>|null
Tags
since
28.0.0
Return values
array<int, string>|null

        
On this page

Search results