public function registerStream(StreamInterface $stream, $replaceWrapper = false)
    {
        $protocol = $stream->getProtocol();
        if ($replaceWrapper === true && in_array($protocol, stream_get_wrappers())) {
            stream_wrapper_unregister($protocol);
        }

        if (stream_wrapper_register($protocol, $stream->getStreamWrapperClass())) {
            self::$streams[$protocol] = $stream;
        }

        return $this;
    }
public function registerStream(StreamInterface $stream, $replaceWrapper = false)
    {
        $protocol = $stream->getProtocol();
        if ($replaceWrapper === true && in_array($protocol, stream_get_wrappers())) {
            stream_wrapper_unregister($protocol);
        }

        if (stream_wrapper_register($protocol, $stream->getStreamWrapperClass())) {
            self::$streams[$protocol] = $stream;
        }

        return $this;
    }
public function registerStream ( StreamInterface $ stream , $ replaceWrapper = false ) { $ protocol = $ stream -> getProtocol ( ) ; if ( $ replaceWrapper === true && in_array ( $ protocol , stream_get_wrappers ( ) ) ) { stream_wrapper_unregister ( $ protocol ) ; } if ( stream_wrapper_register ( $ protocol , $ stream -> getStreamWrapperClass ( ) ) ) { self :: $ streams [ $ protocol ] = $ stream ; } return $ this ; }
Registers stream instance for a protocol.

@param StreamInterface $stream
@param bool            $replaceWrapper

@return self
Registers stream instance for a protocol .