IManager
in
API surface for apps interacting with and making use of TextToImage providers without knowing which providers are installed
Tags
Table of Contents
Methods
- deleteTask() : void
- Delete a task that has been scheduled before
- getProviders() : array<int, IProvider>
- getTask() : Task
- getUserTask() : Task
- getUserTasksByApp() : array<string|int, Task>
- hasProviders() : bool
- runOrScheduleTask() : void
- runTask() : void
- scheduleTask() : void
- Will schedule a TextToImage process in the background. The result will become available with the \OCP\TextToImage\TaskSuccessfulEvent If inference fails a \OCP\TextToImage\Events\TaskFailedEvent will be dispatched instead
Methods
deleteTask()
Delete a task that has been scheduled before
public
deleteTask(Task $task) : void
Parameters
- $task : Task
-
The task to delete
Tags
getProviders()
public
getProviders() : array<int, IProvider>
Tags
Return values
array<int, IProvider>getTask()
public
getTask(int $id) : Task
Parameters
- $id : int
-
The id of the task
Tags
Return values
TaskgetUserTask()
public
getUserTask(int $id, string|null $userId) : Task
Parameters
- $id : int
-
The id of the task
- $userId : string|null
-
The user id that scheduled the task
Tags
Return values
TaskgetUserTasksByApp()
public
getUserTasksByApp(string|null $userId, string $appId[, string|null $identifier = null ]) : array<string|int, Task>
Parameters
- $userId : string|null
- $appId : string
- $identifier : string|null = null
Tags
Return values
array<string|int, Task>hasProviders()
public
hasProviders() : bool
Tags
Return values
boolrunOrScheduleTask()
public
runOrScheduleTask(Task $task) : void
Parameters
- $task : Task
Tags
runTask()
public
runTask(Task $task) : void
Parameters
- $task : Task
-
The task to run
Tags
scheduleTask()
Will schedule a TextToImage process in the background. The result will become available with the \OCP\TextToImage\TaskSuccessfulEvent If inference fails a \OCP\TextToImage\Events\TaskFailedEvent will be dispatched instead
public
scheduleTask(Task $task) : void
Parameters
- $task : Task
-
The task to schedule