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

Breadcrumb

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

function StreamHandler::createSink

1 call to StreamHandler::createSink()
StreamHandler::createResponse in vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php

File

vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php, line 154

Class

StreamHandler
HTTP handler that uses PHP's HTTP stream wrapper.

Namespace

GuzzleHttp\Handler

Code

private function createSink(StreamInterface $stream, array $options) : StreamInterface {
    if (!empty($options['stream'])) {
        return $stream;
    }
    $sink = $options['sink'] ?? Psr7\Utils::tryFopen('php://temp', 'r+');
    return \is_string($sink) ? new Psr7\LazyOpenStream($sink, 'w+') : Psr7\Utils::streamFor($sink);
}

API Navigation

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