Nextcloud PHP API (stable18)

ICheck

Interface ICheck

Tags
since
9.1

Table of Contents

executeCheck()  : bool
isAvailableForScope()  : bool
returns whether the operation can be used in the requested scope.
supportedEntities()  : array
returns a list of Entities the checker supports. The values must match the class name of the entity.
validateCheck()  : mixed

Methods

executeCheck()

public executeCheck(string $operator, string $value) : bool
Parameters
$operator : string
$value : string
Tags
since
9.1
Return values
bool

isAvailableForScope()

returns whether the operation can be used in the requested scope.

public isAvailableForScope(int $scope) : bool

Scope IDs are defined as constants in OCP\WorkflowEngine\IManager. At time of writing these are SCOPE_ADMIN and SCOPE_USER.

For possibly unknown future scopes the recommended behaviour is: if user scope is permitted, the default behaviour should return true, otherwise false.

Parameters
$scope : int
Tags
since
18.0.0
Return values
bool

supportedEntities()

returns a list of Entities the checker supports. The values must match the class name of the entity.

public supportedEntities() : array

An empty result means the check is universally available.

Tags
since
18.0.0
Return values
array

validateCheck()

public validateCheck(string $operator, string $value) : mixed
Parameters
$operator : string
$value : string
Tags
throws
UnexpectedValueException
since
9.1
Return values
mixed

Search results