\pm_LongTask_Manager

Manager of long tasks.

Summary

Methods
Properties
Constants
__construct()
start()
getTasks()
cancel()
cancelAllTasks()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A

Properties

Methods

__construct()

__construct() 

start()

start(\pm_LongTask_Task  $task, \pm_Domain|null  $domain = null) : \pm_LongTask_Task

Start task execution

Parameters

\pm_LongTask_Task $task

Task to start

\pm_Domain|null $domain

Domain context or null for no context

Throws

\pm_Exception

Returns

\pm_LongTask_Task

Launched task

getTasks()

getTasks(array<mixed,string>  $ids, array<mixed,\pm_Domain>|null  $domains = null) : array<mixed,\pm_LongTask_Task>

Get task queue filtered by ID and context

Parameters

array<mixed,string> $ids

Task IDs

array<mixed,\pm_Domain>|null $domains

Domain contexts or null for task without any context

Returns

array<mixed,\pm_LongTask_Task> —

Task queue

cancel()

cancel(\pm_LongTask_Task  $task) 

Cancel task and delete it

Parameters

\pm_LongTask_Task $task

Task to be canceled

cancelAllTasks()

cancelAllTasks() 

Cancel all extension tasks and delete them