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

Breadcrumb

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

function StreamWrapper::createStreamContext

Creates a stream context that can be used to open a stream as a php stream resource.

Return value

resource

1 call to StreamWrapper::createStreamContext()
StreamWrapper::getResource in vendor/guzzlehttp/psr7/src/StreamWrapper.php
Returns a resource representing the stream.

File

vendor/guzzlehttp/psr7/src/StreamWrapper.php, line 55

Class

StreamWrapper
Converts Guzzle streams into PHP stream resources.

Namespace

GuzzleHttp\Psr7

Code

public static function createStreamContext(StreamInterface $stream) {
    return stream_context_create([
        'guzzle' => [
            'stream' => $stream,
        ],
    ]);
}

API Navigation

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