phpBB API Documentation
Class

phpbb\cron\task\wrapper

class wrapper

Cron task wrapper class.

Enhances cron tasks with convenience methods that work identically for all tasks.

Methods

__construct(task $task, string $phpbb_root_path, string $php_ext)

Constructor.

bool is_parametrized()

Returns whether the wrapped task is parametrised.

bool is_ready()

Returns whether the wrapped task is ready to run.

string get_url()

Returns a url through which this task may be invoked via web.

mixed __call($name, $args)

Forwards all other method calls to the wrapped task implementation.

Details

at line 35
public __construct(task $task, string $phpbb_root_path, string $php_ext)

Constructor.

Wraps a task $task, which must implement cron_task interface.

Parameters

task $task The cron task to wrap.
string $phpbb_root_path Relative path to phpBB root
string $php_ext PHP file extension

at line 50
public bool is_parametrized()

Returns whether the wrapped task is parametrised.

Parametrized tasks accept parameters during initialization and must normally be scheduled with parameters.

Return Value

bool Whether or not this task is parametrized.

at line 63
public 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.

Return Value

bool Whether the wrapped task is ready to run.

at line 77
public 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.

Return Value

string URL through which this task may be invoked.

at line 102
public mixed __call($name, $args)

Forwards all other method calls to the wrapped task implementation.

Parameters

$name
$args

Return Value

mixed