code/libraries/joomlatools/library/dispatcher/response/abstract.php
public function getStream()
    {
        if(!isset($this->__stream))
        {
            $content = $this->getContent();
            $factory = $this->getObject('filesystem.stream.factory');

            if(!$this->getObject('filter.path')->validate($content))
            {
                $stream = $factory->createStream('koowa-buffer://memory', 'w+b');
                $stream->write($content);
            }
            else $stream = $factory->createStream($content, 'rb');

            $this->__stream = $stream;
        }

        return $this->__stream;
    }
public function getStream()
    {
        if(!isset($this->__stream))
        {
            $content = $this->getContent();
            $factory = $this->getObject('filesystem.stream.factory');

            if(!$this->getObject('filter.path')->validate($content))
            {
                $stream = $factory->createStream('koowa-buffer://memory', 'w+b');
                $stream->write($content);
            }
            else $stream = $factory->createStream($content, 'rb');

            $this->__stream = $stream;
        }

        return $this->__stream;
    }
public function getStream ( ) { if ( ! isset ( $ this -> __stream ) ) { $ content = $ this -> getContent ( ) ; $ factory = $ this -> getObject ( 'filesystem.stream.factory' ) ; if ( ! $ this -> getObject ( 'filter.path' ) -> validate ( $ content ) ) { $ stream = $ factory -> createStream ( 'koowa-buffer://memory' , 'w+b' ) ; $ stream -> write ( $ content ) ; } else $ stream = $ factory -> createStream ( $ content , 'rb' ) ; $ this -> __stream = $ stream ; } return $ this -> __stream ; }
Get the response stream

The buffer://memory stream wrapper will be used when the response content is a string. If the response content
is of the form "scheme://..." a stream based on the scheme will be created.

See @link http://www.php.net/manual/en/wrappers.php for a list of default PHP stream protocols and wrappers.

@return KFilesystemStreamInterface
Get the response stream