Action_Scheduler\WP_CLI
ProgressBar::__construct()
ProgressBar constructor.
Метод класса: ProgressBar{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$ProgressBar = new ProgressBar(); $ProgressBar->__construct( $message, $count, $interval );
- $message(строка) (обязательный)
- Text to display before the progress bar.
- $count(int) (обязательный)
- Total number of ticks to be performed.
- $interval(int)
- The interval in milliseconds between updates.
По умолчанию: 100*
Код ProgressBar::__construct() ProgressBar:: construct WC 9.3.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; }