ISynchronousProvider
extends
IProvider
in
This is the interface that is implemented by apps that implement a task processing provider
Tags
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
Return values
int —The expected average runtime of a task in seconds
getId()
The unique id of this provider
public
getId() : string
Tags
Return values
stringgetInputShapeDefaults()
Returns the default values for input shape slots
public
getInputShapeDefaults() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getInputShapeEnumValues()
Returns the option list for each input shape ENUM slot
public
getInputShapeEnumValues() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getName()
The localized name of this provider
public
getName() : string
Tags
Return values
stringgetOptionalInputShape()
Returns the shape of optional input parameters
public
getOptionalInputShape() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getOptionalInputShapeDefaults()
Returns the default values for optional input shape slots
public
getOptionalInputShapeDefaults() : array<string|int, mixed>
Tags
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
Return values
array<string|int, mixed>getOptionalOutputShape()
Returns the shape of optional output parameters
public
getOptionalOutputShape() : array<string|int, mixed>
Tags
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
Return values
array<string|int, mixed>getOutputShapeEnumValues()
Returns the option list for each output shape ENUM slot
public
getOutputShapeEnumValues() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getTaskTypeId()
Returns the task type id of the task type, that this provider handles
public
getTaskTypeId() : string
Tags
Return values
stringprocess()
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.