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

Breadcrumb

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

function SymfonyStyle::__construct

Overrides OutputStyle::__construct

File

vendor/symfony/console/Style/SymfonyStyle.php, line 48

Class

SymfonyStyle
Output decorator helpers for the Symfony Style Guide.

Namespace

Symfony\Component\Console\Style

Code

public function __construct(InputInterface $input, OutputInterface $output) {
    $this->bufferedOutput = new TrimmedBufferOutput(\DIRECTORY_SEPARATOR === '\\' ? 4 : 2, $output->getVerbosity(), false, clone $output->getFormatter());
    // Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not.
    $width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH;
    $this->lineLength = min($width - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
    parent::__construct($output);
}

API Navigation

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