\Action_Scheduler\WP_CLIProgressBar

Class ProgressBar

Summary

Methods
Properties
Constants
__construct()
tick()
current()
finish()
set_message()
set_count()
No public properties found
No constants found
setup_progress_bar()
$total_ticks
$count
$interval
$message
$progress_bar
N/A
No private methods found
No private properties found
N/A

Properties

$total_ticks

$total_ticks : int

Current number of ticks.

Type

normal

$count

$count : int

Total number of ticks.

Type

normal

$interval

$interval : int

Progress bar update interval.

Type

normal

$message

$message : string

Progress bar message.

Type

normal

$progress_bar

$progress_bar : \cli\progress\Bar

Instance.

Type

\cli\progress\Bar

Methods

__construct()

__construct(string  $message, int  $count, int  $interval = 100) : mixed

ProgressBar constructor.

Parameters

string $message

Text to display before the progress bar.

int $count

Total number of ticks to be performed.

int $interval

Optional. The interval in milliseconds between updates. Default 100.

Throws

\Exception

When this is not run within WP CLI.

Returns

mixed

tick()

tick() : mixed

Increment the progress bar ticks.

Returns

mixed

current()

current() : int

Get the progress bar tick count.

Returns

int

finish()

finish() : mixed

Finish the current progress bar.

Returns

mixed

set_message()

set_message(string  $message) : mixed

Set the message used when creating the progress bar.

Parameters

string $message

The message to be used when the next progress bar is created.

Returns

mixed

set_count()

set_count(int  $count) : mixed

Set the count for a new progress bar.

Parameters

int $count

The total number of ticks expected to complete.

Returns

mixed

setup_progress_bar()

setup_progress_bar() : mixed

Set up the progress bar.

Returns

mixed