You are here

class Stream in Zircon Profile 8.0

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

@author Kévin Dunglas <dunglas@gmail.com>

Hierarchy

Expanded class hierarchy of Stream

1 file declares its use of Stream
HttpFoundationFactoryTest.php in vendor/symfony/psr-http-message-bridge/Tests/Factory/HttpFoundationFactoryTest.php

File

vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php, line 19

Namespace

Symfony\Bridge\PsrHttpMessage\Tests\Fixtures
View source
class Stream implements StreamInterface {
  private $stringContent;
  public function __construct($stringContent = '') {
    $this->stringContent = $stringContent;
  }
  public function __toString() {
    return $this->stringContent;
  }
  public function close() {
  }
  public function detach() {
  }
  public function getSize() {
  }
  public function tell() {
    return 0;
  }
  public function eof() {
    return true;
  }
  public function isSeekable() {
    return false;
  }
  public function seek($offset, $whence = SEEK_SET) {
  }
  public function rewind() {
  }
  public function isWritable() {
    return false;
  }
  public function write($string) {
  }
  public function isReadable() {
    return true;
  }
  public function read($length) {
    return $this->stringContent;
  }
  public function getContents() {
    return $this->stringContent;
  }
  public function getMetadata($key = null) {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Stream::$stringContent private property
Stream::close public function Closes the stream and any underlying resources. Overrides StreamInterface::close
Stream::detach public function Separates any underlying resources from the stream. Overrides StreamInterface::detach
Stream::eof public function Returns true if the stream is at the end of the stream. Overrides StreamInterface::eof
Stream::getContents public function Returns the remaining contents in a string Overrides StreamInterface::getContents
Stream::getMetadata public function Get stream metadata as an associative array or retrieve a specific key. Overrides StreamInterface::getMetadata
Stream::getSize public function Get the size of the stream if known. Overrides StreamInterface::getSize
Stream::isReadable public function Returns whether or not the stream is readable. Overrides StreamInterface::isReadable
Stream::isSeekable public function Returns whether or not the stream is seekable. Overrides StreamInterface::isSeekable
Stream::isWritable public function Returns whether or not the stream is writable. Overrides StreamInterface::isWritable
Stream::read public function Read data from the stream. Overrides StreamInterface::read
Stream::rewind public function Seek to the beginning of the stream. Overrides StreamInterface::rewind
Stream::seek public function Seek to a position in the stream. Overrides StreamInterface::seek
Stream::tell public function Returns the current position of the file read/write pointer Overrides StreamInterface::tell
Stream::write public function Write data to the stream. Overrides StreamInterface::write
Stream::__construct public function
Stream::__toString public function Reads all data from the stream into a string, from the beginning to end. Overrides StreamInterface::__toString