Action_Scheduler\WP_CLI
ProgressBar::__construct()
ProgressBar constructor.
Method of the class: ProgressBar{}
No Hooks.
Return
null
. Nothing (null).
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*
ProgressBar::__construct() ProgressBar:: construct code WC 9.5.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; }