function BufferIO::createStream
Parameters
string[] $inputs:
Return value
resource stream
1 call to BufferIO::createStream()
- BufferIO::setUserInputs in vendor/
composer/ composer/ src/ Composer/ IO/ BufferIO.php
File
-
vendor/
composer/ composer/ src/ Composer/ IO/ BufferIO.php, line 90
Class
- BufferIO
- @author Jordi Boggiano <j.boggiano@seld.be>
Namespace
Composer\IOCode
private function createStream(array $inputs) {
$stream = fopen('php://memory', 'r+');
if ($stream === false) {
throw new \RuntimeException('Unable to open memory output stream');
}
foreach ($inputs as $input) {
fwrite($stream, $input . PHP_EOL);
}
rewind($stream);
return $stream;
}