Return an SplFileObject representing this string stream

@return SplFileObject
353807
public function getFileObject()
    {
        return new SplFileObject(
            self::WNAME . '://' . spl_object_hash($this),
            'rb',
            false,
            stream_context_create(array(
                self::WNAME => array(
                    'string' => $this
                )
            ))
        );
    }
942212
public function getStream()
	{
		$this->validateActive();

		if ($this->stream instanceof StreamInterface) {
			return $this->stream;
		}

		return Factory::streamFromFile($this->file, 'r');
	}
430097
public function getSplFileInfo(): \SplFileInfo
    {
        if (null !== $this->splFileInfo && $this->path === $this->splFileInfo->getRealPath()) {
            return $this->splFileInfo;
        }
        $this->assertExists();

        return $this->createSplFileInfo();
    }
869373
public function getContents(){
        if(null === $this->resource){
            throw new Exception\StreamUnavailableException(
                static::EXCEPTION_MSG_UNAVAILABLE
            );
        }

        if(!$this->isReadable()){
            throw new Exception\StreamUnreadableException(
                static::EXCEPTION_MSG_UNREADABLE
            );
        }

        if(false === ($contents = stream_get_contents($this->resource))){
            throw new \RuntimeException("Failed to read stream.");
        }

        return $contents;
    }
213392
protected function createStream()
    {
        $stream = Psr7\stream_for();
        $this->writePartHeadersTo($stream);
        $stream->rewind();
        return $stream;
    }
744510
public function stream_eof()
    {
        return $this->_download !== null
            ? ($this->_pointerOffset >= $this->_download->getSize())
            : true;
    }
880240
public function detach()
    {
        $stream = $this->stream;

        $this->stream = null;
        $this->readable = null;
        $this->writable = null;
        $this->seekable = null;
        $this->size = null;

        return $stream;
    }
1083242
public function getStream()
    {
        if ($this->stream === null) {
            return $this->streamFactory->newMessagePartStream($this);
        }
        $this->stream->rewind();
        return $this->stream;
    }
957557
private function readObject() {

        $inString = false;

        while ($this->getStream() || !$this->arrayEnd) {
            for(; $this->cursor < strlen($this->stream); $this->cursor++) {

                $this->jumpCursor();

                switch($this->stream{$this->cursor}) {
                    case '"':
                        $inString = !$inString;
                        break;
                    case "{":
                        if($inString) break;
                        $this->openingBrackets++;
                        break;
                    case "}":
                        if($inString) break;
                        $this->closingBrackets++;
                        break;
                }

                // If condition is met return data back to user for manipulation.
                if($this->openingBrackets == $this->closingBrackets && $this->openingBrackets != 0) {
                    return true;
                }

            }
        }

        return false;
    }
751728
private XStream getXStreamObject()
    {
        XStream stream = new XStream();
        stream.alias("indexerProperties", IndexerProperties.class);
        stream.alias("node", IndexerProperties.Node.class);
        return stream;
    }
428103
private function getBody()
    {
        if ($this->body) {
            return $this->body;
        } elseif ($this->files || $this->forceMultipart) {
            return $this->body = $this->createMultipart();
        } elseif ($this->fields) {
            return $this->body = $this->createUrlEncoded();
        } else {
            return $this->body = Stream::factory();
        }
    }
1297672
public function getBody()
    {
        $streamResource = fopen('php://memory', 'r+');
        if (is_resource($this->content)) {
            stream_copy_to_stream($this->content, $streamResource);
        } else {
            fwrite($streamResource, $this->content);
        }
        rewind($streamResource);

        return new ContentStream($streamResource);
    }
1334150
public function fopen()
    {
        return fopen(
            self::WNAME . '://' . spl_object_hash($this),
            'rb',
            false,
            stream_context_create(array(
                self::WNAME => array(
                    'string' => $this
                )
            ))
        );
    }
756222
public function getStream()
    {
        if ($this->stream instanceof \Closure) {
            $this->stream = $this->stream->__invoke();
        }
        if (is_resource($this->stream)) {
            $meta = stream_get_meta_data($this->stream);
            if ($meta['seekable']) {
                rewind($this->stream);
            }
        }
        return $this->stream;
    }
366309
public function getStream(): StreamInterface
        {
            if ($this->moved) {
                throw new \RuntimeException(sprintf('Uploaded file %1s has already been moved', $this->clientFilename));
            }
            return $this->file;
        }
568868
protected function createSplFileInfo(): \SplFileInfo
    {
        if (null !== $this->splFileInfo && $this->path === $this->splFileInfo->getRealPath()) {
            return $this->splFileInfo;
        }
        $this->splFileInfo = new \SplFileInfo($this->path);

        return $this->splFileInfo;
    }
658470
public function getContents()
    {
        $content = '';
        while(!$this->streamable->isEOF()) {
            $r = $this->streamable->read(1024);
            if ($r == null)
                break;

            $content .= $r;
        }
        
        return $content;
    }