You are here

public function Stream::close in Zircon Profile 8

Same name in this branch
  1. 8 vendor/zendframework/zend-diactoros/src/Stream.php \Zend\Diactoros\Stream::close()
  2. 8 vendor/guzzlehttp/psr7/src/Stream.php \GuzzleHttp\Psr7\Stream::close()
  3. 8 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Stream::close()
Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/src/Stream.php \GuzzleHttp\Psr7\Stream::close()

Closes the stream and any underlying resources.

Return value

void

Overrides StreamInterface::close

1 call to Stream::close()
Stream::__destruct in vendor/guzzlehttp/psr7/src/Stream.php
Closes the stream when the destructed

File

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

Class

Stream
PHP stream implementation.

Namespace

GuzzleHttp\Psr7

Code

public function close() {
  if (isset($this->stream)) {
    if (is_resource($this->stream)) {
      fclose($this->stream);
    }
    $this
      ->detach();
  }
}