WordPress at Your Fingertips
function is not described

Action_Scheduler\WP_CLI

ProgressBar::__construct() public WC 1.0

ProgressBar constructor.

{} It's a method of the class: ProgressBar{}

No Hooks.

Return

null. Nothing.

Usage

$ProgressBar = new ProgressBar();
$ProgressBar->__construct( $message, $count, $interval );
$message(string) (required)
Text to display before the progress bar.
$count(int) (required)
Total number of ticks to be performed.
$interval(int)
The interval in milliseconds between updates.

Default: 100*

Code of ProgressBar::__construct() WC 6.1.1

public function __construct( $message, $count, $interval = 100 ) {
	if ( ! ( defined( 'WP_CLI' ) && WP_CLI ) ) {
		/* translators: %s php class name */
		throw new \Exception( sprintf( __( 'The %s class can only be run within WP CLI.', 'woocommerce' ), __CLASS__ ) );
	}

	$this->total_ticks = 0;
	$this->message     = $message;
	$this->count       = $count;
	$this->interval    = $interval;
}