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

Breadcrumb

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

function StreamInterface::getMetadata

Get stream metadata as an associative array or retrieve a specific key.

The keys returned are identical to the keys returned from PHP's stream_get_meta_data() function.

@link http://php.net/manual/en/function.stream-get-meta-data.php

Parameters

string|null $key Specific metadata to retrieve.:

Return value

array|mixed|null Returns an associative array if no key is provided. Returns a specific key value if a key is provided and the value is found, or null if the key is not found.

5 methods override StreamInterface::getMetadata()
AppendStream::getMetadata in vendor/guzzlehttp/psr7/src/AppendStream.php
BufferStream::getMetadata in vendor/guzzlehttp/psr7/src/BufferStream.php
FnStream::getMetadata in vendor/guzzlehttp/psr7/src/FnStream.php
PumpStream::getMetadata in vendor/guzzlehttp/psr7/src/PumpStream.php
Stream::getMetadata in vendor/guzzlehttp/psr7/src/Stream.php

File

vendor/psr/http-message/src/StreamInterface.php, line 157

Class

StreamInterface
Describes a data stream.

Namespace

Psr\Http\Message

Code

public function getMetadata(?string $key = null);

API Navigation

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