TaskFactory
Factory class for generating runnable automation tasks and cron tasks
Table of Contents
Properties
| $date |
Methods
| __call() | Autoload \Blesta\Core\Automation\Tasks\Task\* by name |
| __construct() | Initialize the factory |
| cronTask() | Creates a new cron task |
Methods
__call()
Autoload \Blesta\Core\Automation\Tasks\Task\* by name
public
__call(string $name, array<string|int, mixed> $arguments) : AutomationTypeInterface
Parameters
- $name : string
-
The name of the task to load
- $arguments : array<string|int, mixed>
-
An array of arguments to pass to the task instance constructor
Tags
Return values
AutomationTypeInterface —An instance of the task
__construct()
Initialize the factory
public
__construct(Date $date) : mixed
Parameters
- $date : Date
-
A configured instance of \Minphp\Date\Date
cronTask()
Creates a new cron task
public
cronTask(stdClass $task[, array<string|int, mixed> $options = [] ]) : Task
Parameters
- $task : stdClass
-
An stdClass object representing the cron task
- $options : array<string|int, mixed> = []
-
An array of options:
- log_group The name of the cron log group to use for logging purposes
Return values
Task —The cron task