You are here

public function Stream::detach in Lockr 7.3

Separates any underlying resources from the stream.

After the stream has been detached, the stream is in an unusable state.

Return value

resource|null Underlying PHP stream, if any

Overrides StreamInterface::detach

1 call to Stream::detach()
Stream::close in vendor/guzzlehttp/psr7/src/Stream.php
Closes the stream and any underlying resources.

File

vendor/guzzlehttp/psr7/src/Stream.php, line 116

Class

Stream
PHP stream implementation.

Namespace

GuzzleHttp\Psr7

Code

public function detach() {
  if (!isset($this->stream)) {
    return null;
  }
  $result = $this->stream;
  unset($this->stream);
  $this->size = $this->uri = null;
  $this->readable = $this->writable = $this->seekable = false;
  return $result;
}