You are here

public function PumpStream::getMetadata in Auth0 Single Sign On 8.2

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 $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.

Overrides StreamInterface::getMetadata

File

vendor/guzzlehttp/psr7/src/PumpStream.php, line 142

Class

PumpStream
Provides a read only stream that pumps data from a PHP callable.

Namespace

GuzzleHttp\Psr7

Code

public function getMetadata($key = null) {
  if (!$key) {
    return $this->metadata;
  }
  return isset($this->metadata[$key]) ? $this->metadata[$key] : null;
}