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

Breadcrumb

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

function BufferIO::__construct

Overrides ConsoleIO::__construct

File

vendor/composer/composer/src/Composer/IO/BufferIO.php, line 30

Class

BufferIO
@author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\IO

Code

public function __construct(string $input = '', int $verbosity = StreamOutput::VERBOSITY_NORMAL, ?OutputFormatterInterface $formatter = null) {
    $input = new StringInput($input);
    $input->setInteractive(false);
    $stream = fopen('php://memory', 'rw');
    if ($stream === false) {
        throw new \RuntimeException('Unable to open memory output stream');
    }
    $output = new StreamOutput($stream, $verbosity, $formatter !== null ? $formatter->isDecorated() : false, $formatter);
    parent::__construct($input, $output, new HelperSet([
        new QuestionHelper(),
    ]));
}

API Navigation

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