Nextcloud PHP API (master)

ISynchronousProvider extends IProvider

This is the interface that is implemented by apps that implement a task processing provider

Tags
since
30.0.0

Table of Contents

Methods

getExpectedRuntime()  : int
getId()  : string
The unique id of this provider
getInputShapeDefaults()  : array<string|int, mixed>
Returns the default values for input shape slots
getInputShapeEnumValues()  : array<string|int, mixed>
Returns the option list for each input shape ENUM slot
getName()  : string
The localized name of this provider
getOptionalInputShape()  : array<string|int, mixed>
Returns the shape of optional input parameters
getOptionalInputShapeDefaults()  : array<string|int, mixed>
Returns the default values for optional input shape slots
getOptionalInputShapeEnumValues()  : array<string|int, mixed>
Returns the option list for each optional input shape ENUM slot
getOptionalOutputShape()  : array<string|int, mixed>
Returns the shape of optional output parameters
getOptionalOutputShapeEnumValues()  : array<string|int, mixed>
Returns the option list for each optional output shape ENUM slot
getOutputShapeEnumValues()  : array<string|int, mixed>
Returns the option list for each output shape ENUM slot
getTaskTypeId()  : string
Returns the task type id of the task type, that this provider handles
process()  : array<string|int, mixed>
Returns the shape of optional output parameters

Methods

getExpectedRuntime()

public getExpectedRuntime() : int
Tags
since
30.0.0
Return values
int

The expected average runtime of a task in seconds

getId()

The unique id of this provider

public getId() : string
Tags
since
30.0.0
Return values
string

getInputShapeDefaults()

Returns the default values for input shape slots

public getInputShapeDefaults() : array<string|int, mixed>
Tags
since
30.0.0
psalm-return

array<array-key, string|numeric>

Return values
array<string|int, mixed>

getInputShapeEnumValues()

Returns the option list for each input shape ENUM slot

public getInputShapeEnumValues() : array<string|int, mixed>
Tags
since
30.0.0
psalm-return

ShapeEnumValue[][]

Return values
array<string|int, mixed>

getName()

The localized name of this provider

public getName() : string
Tags
since
30.0.0
Return values
string

getOptionalInputShape()

Returns the shape of optional input parameters

public getOptionalInputShape() : array<string|int, mixed>
Tags
since
30.0.0
psalm-return

ShapeDescriptor[]

Return values
array<string|int, mixed>

getOptionalInputShapeDefaults()

Returns the default values for optional input shape slots

public getOptionalInputShapeDefaults() : array<string|int, mixed>
Tags
since
30.0.0
psalm-return

array<array-key, string|numeric>

Return values
array<string|int, mixed>

getOptionalInputShapeEnumValues()

Returns the option list for each optional input shape ENUM slot

public getOptionalInputShapeEnumValues() : array<string|int, mixed>
Tags
since
30.0.0
psalm-return

ShapeEnumValue[][]

Return values
array<string|int, mixed>

getOptionalOutputShape()

Returns the shape of optional output parameters

public getOptionalOutputShape() : array<string|int, mixed>
Tags
since
30.0.0
psalm-return

ShapeDescriptor[]

Return values
array<string|int, mixed>

getOptionalOutputShapeEnumValues()

Returns the option list for each optional output shape ENUM slot

public getOptionalOutputShapeEnumValues() : array<string|int, mixed>
Tags
since
30.0.0
psalm-return

ShapeEnumValue[][]

Return values
array<string|int, mixed>

getOutputShapeEnumValues()

Returns the option list for each output shape ENUM slot

public getOutputShapeEnumValues() : array<string|int, mixed>
Tags
since
30.0.0
psalm-return

ShapeEnumValue[][]

Return values
array<string|int, mixed>

getTaskTypeId()

Returns the task type id of the task type, that this provider handles

public getTaskTypeId() : string
Tags
since
30.0.0
Return values
string

process()

Returns the shape of optional output parameters

public process(null|string $userId, array<string, array<int, (numeric)|string|File>|(numeric)|string|File$input, callable(float): bool $reportProgress) : array<string|int, mixed>
Parameters
$userId : null|string

The user that created the current task

$input : array<string, array<int, (numeric)|string|File>|(numeric)|string|File>

The task input

$reportProgress : callable(float): bool

Report the task progress. If this returns false, that means the task was cancelled and processing should be stopped.

Tags
psalm-return

array<string, list<numeric|string>|numeric|string>

throws
ProcessingException
since
30.0.0
Return values
array<string|int, mixed>

        
On this page

Search results