pm_LongTask_Manager
in package
Manager of long tasks.
Tags
Table of Contents
- __construct() : mixed
- cancel() : mixed
- Cancel task and delete it
- cancelAllTasks() : void
- Cancel all extension tasks and delete them
- getTasks() : array<string|int, pm_LongTask_Task>
- Get task queue filtered by ID and context
- start() : pm_LongTask_Task
- Start task execution
Methods
__construct()
public
__construct() : mixed
Return values
mixed —cancel()
Cancel task and delete it
public
cancel(pm_LongTask_Task $task) : mixed
Parameters
- $task : pm_LongTask_Task
-
Task to be canceled
Return values
mixed —cancelAllTasks()
Cancel all extension tasks and delete them
public
cancelAllTasks() : void
Return values
void —getTasks()
Get task queue filtered by ID and context
public
getTasks(array<string|int, string> $ids[, array<string|int, pm_Domain>|null $domains = null ]) : array<string|int, pm_LongTask_Task>
Parameters
- $ids : array<string|int, string>
-
Task IDs
- $domains : array<string|int, pm_Domain>|null = null
-
Domain contexts or null for task without any context
Return values
array<string|int, pm_LongTask_Task> —Task queue
start()
Start task execution
public
start(pm_LongTask_Task $task[, pm_Domain|null $domain = null ]) : pm_LongTask_Task
Parameters
- $task : pm_LongTask_Task
-
Task to start
- $domain : pm_Domain|null = null
-
Domain context or null for no context
Tags
Return values
pm_LongTask_Task —Launched task