Blesta Source Documentation

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
Properties

$date

protected Date $date

An instance of \Minphp\Date\Date

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
throws
BadMethodCallException
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

Tags
subpackage

core.Automation

copyright

Copyright (c) 2018, Phillips Data, Inc.

license

http://www.blesta.com/license/ The Blesta License Agreement

link

Blesta


        
On this page

Search results