manager
class manager
Cron manager class.
Finds installed cron tasks, stores task objects, provides task selection.
Properties
protected ContainerInterface | $phpbb_container | ||
protected helper | $routing_helper | ||
protected array | $tasks | Set of \phpbb\cron\task\wrapper objects. |
|
protected bool | $is_initialised_from_container | Flag indicating if $this->tasks contains tasks registered in the container |
|
protected string | $phpbb_root_path | ||
protected string | $php_ext | ||
protected template | $template |
Methods
Constructor. Loads all available tasks.
Loads tasks given by name, wraps them and puts them into $this->tasks.
Loads registered tasks from the container, wraps them and puts them into $this->tasks.
Finds a task that is ready to run.
Finds all tasks that are ready to run.
Find all tasks and return them.
Details
at line 76
__construct(ContainerInterface $phpbb_container, helper $routing_helper, string $phpbb_root_path, string $php_ext, template $template)
Constructor. Loads all available tasks.
at line 91
load_tasks(array|Traversable $tasks)
Loads tasks given by name, wraps them and puts them into $this->tasks.
at line 103
load_tasks_from_container()
Loads registered tasks from the container, wraps them and puts them into $this->tasks.
at line 124
wrapper|null
find_one_ready_task()
Finds a task that is ready to run.
If several tasks are ready, any one of them could be returned.
If no tasks are ready, null is returned.
at line 144
array
find_all_ready_tasks()
Finds all tasks that are ready to run.
at line 169
wrapper
find_task(string $name)
Finds a task by name.
If there is no task with the specified name, null is returned.
Web runner uses this method to resolve names to tasks.
at line 188
array
get_tasks()
Find all tasks and return them.