lib/VirtFs.php
public function registerStreamWrapper($protocol=null)
    {
        if ($this->registered_wrapper) {
            throw new \RuntimeException("Unregister the wrapper before registering it again!");
        }
        if ($protocol && !$this->protocol) {
            $this->protocol = $protocol; 
        }
        $this->registered_wrapper = true;
        self::$handlers[$this->protocol] = $this;
        return stream_wrapper_register($this->protocol, __CLASS__, 0);
    }
public function registerStreamWrapper($protocol=null)
    {
        if ($this->registered_wrapper) {
            throw new \RuntimeException("Unregister the wrapper before registering it again!");
        }
        if ($protocol && !$this->protocol) {
            $this->protocol = $protocol; 
        }
        $this->registered_wrapper = true;
        self::$handlers[$this->protocol] = $this;
        return stream_wrapper_register($this->protocol, __CLASS__, 0);
    }
public function registerStreamWrapper ( $ protocol = null ) { if ( $ this -> registered_wrapper ) { throw new \ RuntimeException ( "Unregister the wrapper before registering it again!" ) ; } if ( $ protocol && ! $ this -> protocol ) { $ this -> protocol = $ protocol ; } $ this -> registered_wrapper = true ; self :: $ handlers [ $ this -> protocol ] = $ this ; return stream_wrapper_register ( $ this -> protocol , __CLASS__ , 0 ) ; }
Register a protocol as a stream wrapper.

This makes access possible with the regular file i/o functions using
a path such as "protocol://file.txt".

@param string The protocol to register
@return bool
@throws \RuntimeException
Register a protocol as a stream wrapper .