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\IOCode
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(),
]));
}