phpBB API Documentation
Class

phpbb\cron\task\core\tidy_sessions

class tidy_sessions extends base

Tidy sessions cron task.

Methods

string get_name()

Returns the name of the task.

from base
set_name(string $name)

Sets the name of the task.

from base
bool is_runnable()

Returns whether this cron task can run, given current board configuration.

from base
bool should_run()

Returns whether this cron task should run now, because enough time has passed since it was last run.

__construct(config $config, user $user)

Constructor.

null run()

Runs this cron task.

Details

in base at line 34
public string get_name()

Returns the name of the task.

Return Value

string Name of wrapped task.

in base at line 44
public set_name(string $name)

Sets the name of the task.

Parameters

string $name The task name

in base at line 57
public bool is_runnable()

Returns whether this cron task can run, given current board configuration.

For example, a cron task that prunes forums can only run when forum pruning is enabled.

Return Value

bool

at line 55
public bool should_run()

Returns whether this cron task should run now, because enough time has passed since it was last run.

The interval between session tidying is specified in board configuration.

Return Value

bool

at line 30
public __construct(config $config, user $user)

Constructor.

Parameters

config $config The config
user $user The user

at line 41
public null run()

Runs this cron task.

Return Value

null