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

Breadcrumb

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

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\IO

Code

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;
}

API Navigation

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