public function runAfterTime( |
| ) |
Sets or gets the time after which the task should run.
public function shouldRun( |
| ) |
Determines if the task should be run based on the current time.
A boolean indicating if the task should be run or not.
Whether or not the task should be deleted from the queue. Note that this will be called after the task manager attempts to execute it and that this will be called regardless of whether the task is executed. So if a task should delete after execution, it should mutate it's state to make this return true after running.
Boolean for whether the task should be deleted.
public function data( |
| ) |
Get or set the data associated with the task.
data | (Mixed) An arbitrary nullable data value. |
The current data or null if a parameter is passed.
public function serializedData( |
| ) |
Get or set the data in a JSON-serializable form. Whereas plain-old "data" can be anything, the value returned here must be JSON-serializable.
A mixed value that can be passed to json_encode().
Get a subset of the task data to serve as a key. This is intended to uniquely identify a particular task of a particular class so that it can be removed or updated later. If the task does not need to be unique, this can return null.
A string uniquely identifying the task within it's class.
Runs the task.