CmsRegularTask
in
An interface to define how tasks should work.
Tags
Table of Contents
Methods
- execute() : bool
- Execute a given task
- get_description() : string
- Get the description for this task.
- get_name() : string
- Get the name for this task
- on_failure() : mixed
- Execute steps that should be taken on failure of this task.
- on_success() : mixed
- Execute steps that should be taken on success of this task.
- test() : mixed
- Test if a function should be executed given the supplied time argument
Methods
execute()
Execute a given task
public
execute([int $time = '' ]) : bool
Parameters
- $time : int = ''
-
The time at which the task should consider the execution occurred at. Assume the current time if empty.
Return values
bool —TRUE on success, FALSE otherwise.
get_description()
Get the description for this task.
public
get_description() : string
Return values
stringget_name()
Get the name for this task
public
get_name() : string
Return values
stringon_failure()
Execute steps that should be taken on failure of this task.
public
on_failure([int $time = '' ]) : mixed
This method is called after the execute step if the execute step returned FALSE.
Parameters
- $time : int = ''
-
The time at which the task should consider the execution occurred at. Assume the current time if empty.
on_success()
Execute steps that should be taken on success of this task.
public
on_success([int $time = '' ]) : mixed
This method is called after the execute step if the execute step returned TRUE.
Parameters
- $time : int = ''
-
The time at which the task should consider the execution occurred at. Assume the current time if empty.
test()
Test if a function should be executed given the supplied time argument
public
test([int $time = '' ]) : mixed
Parameters
- $time : int = ''
-
The time at which any comparisons for execution should be performed. If empty the current time is assumed.