BackgroundProcess extends WP_Background_Process
in package

Tags
note

Action name length must be less than or equal to 19 symbols. Length of option name is 64. Option name consist of: + (1-4) blog id + (8) prefix "mphb_bg" + prefix separator "_" + (16 <=) action name of background process + (13) suffix "_process_lock" + (23) wp's transient prefix "_site_transient_timeout"

since
3.5.0

the class has been completely rewritten.

Table of Contents

$completedTasksOption  : mixed
$prefix  : mixed
$tasksCountOption  : mixed
__construct()  : mixed
getCompletedTasksCount()  : int
getIdentifier()  : string
getProgress()  : float
getQueueSize()  : int
getTasksCount()  : int
isInProgress()  : bool
save()  : mixed
after_task_done()  : mixed
afterComplete()  : mixed
complete()  : mixed
increaseCompletedTasksCount()  : mixed
increaseTasksCount()  : mixed
setCompletedTasksCount()  : mixed
setTasksCount()  : mixed

Properties

$completedTasksOption

protected mixed $completedTasksOption

$prefix

protected mixed $prefix = 'mphb_bg'

$tasksCountOption

protected mixed $tasksCountOption

Methods

__construct()

public __construct() : mixed
Return values
mixed

getCompletedTasksCount()

public getCompletedTasksCount() : int
Return values
int

getIdentifier()

public getIdentifier() : string
Return values
string

getProgress()

public getProgress() : float
Return values
float

The progress value in range [0; 100].

getQueueSize()

public getQueueSize() : int
Return values
int

Only the size of the queue left to proceed (exclude completed batches).

getTasksCount()

public getTasksCount() : int
Return values
int

isInProgress()

public isInProgress() : bool
Return values
bool

save()

public save() : mixed
Return values
mixed

after_task_done()

protected after_task_done() : mixed
Return values
mixed

afterComplete()

protected afterComplete() : mixed
Return values
mixed

complete()

protected complete() : mixed
Return values
mixed

increaseCompletedTasksCount()

protected increaseCompletedTasksCount([int $amount = 1 ]) : mixed
Parameters
$amount : int = 1

Optional. 1 by default.

Return values
mixed

increaseTasksCount()

protected increaseTasksCount(int $amount) : mixed
Parameters
$amount : int
Return values
mixed

setCompletedTasksCount()

protected setCompletedTasksCount(int $count) : mixed
Parameters
$count : int
Return values
mixed

setTasksCount()

protected setTasksCount(int $count) : mixed
Parameters
$count : int
Return values
mixed

Search results