Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ProgressIndicator.php

function ProgressIndicator::__construct

Parameters

int $indicatorChangeInterval Change interval in milliseconds:

array|null $indicatorValues Animated indicator characters:

File

vendor/symfony/console/Helper/ProgressIndicator.php, line 53

Class

ProgressIndicator
@author Kevin Bond <kevinbond@gmail.com>

Namespace

Symfony\Component\Console\Helper

Code

public function __construct(OutputInterface $output, ?string $format = null, int $indicatorChangeInterval = 100, ?array $indicatorValues = null, ?string $finishedIndicatorValue = null) {
    $format ??= $this->determineBestFormat();
    $indicatorValues ??= [
        '-',
        '\\',
        '|',
        '/',
    ];
    $indicatorValues = array_values($indicatorValues);
    $finishedIndicatorValue ??= '✔';
    if (2 > \count($indicatorValues)) {
        throw new InvalidArgumentException('Must have at least 2 indicator value characters.');
    }
    $this->format = self::getFormatDefinition($format);
    $this->indicatorValues = $indicatorValues;
    $this->finishedIndicatorValue = $finishedIndicatorValue;
    $this->startTime = time();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal