wrapper
class wrapper
Cron task wrapper class.
Enhances cron tasks with convenience methods that work identically for all tasks.
Properties
protected helper | $routing_helper | ||
protected task | $task | ||
protected string | $phpbb_root_path | ||
protected string | $php_ext | ||
protected template | $template |
Methods
Constructor.
Returns whether the wrapped task is parametrised.
Returns whether the wrapped task is ready to run.
Returns a url through which this task may be invoked via web.
Returns HTML for an invisible img
tag that can be displayed on page
load to trigger a request to the relevant cron task endpoint.
Forwards all other method calls to the wrapped task implementation.
Details
at line 60
__construct(task $task, helper $routing_helper, string $phpbb_root_path, string $php_ext, template $template)
Constructor.
Wraps a task $task, which must implement cron_task interface.
at line 77
bool
is_parametrized()
Returns whether the wrapped task is parametrised.
Parametrized tasks accept parameters during initialization and must normally be scheduled with parameters.
at line 90
bool
is_ready()
Returns whether the wrapped task is ready to run.
A task is ready to run when it is runnable according to current configuration and enough time has passed since it was last run.
at line 104
string
get_url()
Returns a url through which this task may be invoked via web.
When system cron is not in use, running a cron task is accomplished by outputting an image with the url returned by this function as source.
at line 121
string
get_html_tag()
Returns HTML for an invisible img
tag that can be displayed on page
load to trigger a request to the relevant cron task endpoint.
at line 137
mixed
__call($name, $args)
Forwards all other method calls to the wrapped task implementation.