code/libraries/joomlatools/library/filesystem/stream/factory.php
public function registerStream($identifier)
    {
        $result = false;

        $identifier = $this->getIdentifier($identifier);
        $class      = $this->getObject('manager')->getClass($identifier);

        if(!$class || !array_key_exists('KFilesystemStreamInterface', class_implements($class)))
        {
            throw new UnexpectedValueException(
                'Stream: '.$identifier.' does not implement KFilesystemStreamInterface'
            );
        }

        $name = $class::getName();

        if (!empty($name) && !$this->isRegistered($this->_stream_prefix.$name))
        {
            if($result = stream_wrapper_register($this->_stream_prefix.$name, 'KFilesystemStreamAdapter')) {
                $this->__streams[$this->_stream_prefix.$name] = $identifier;
            }
        }

        return $result;
    }
public function registerStream($identifier)
    {
        $result = false;

        $identifier = $this->getIdentifier($identifier);
        $class      = $this->getObject('manager')->getClass($identifier);

        if(!$class || !array_key_exists('KFilesystemStreamInterface', class_implements($class)))
        {
            throw new UnexpectedValueException(
                'Stream: '.$identifier.' does not implement KFilesystemStreamInterface'
            );
        }

        $name = $class::getName();

        if (!empty($name) && !$this->isRegistered($this->_stream_prefix.$name))
        {
            if($result = stream_wrapper_register($this->_stream_prefix.$name, 'KFilesystemStreamAdapter')) {
                $this->__streams[$this->_stream_prefix.$name] = $identifier;
            }
        }

        return $result;
    }
public function registerStream ( $ identifier ) { $ result = false ; $ identifier = $ this -> getIdentifier ( $ identifier ) ; $ class = $ this -> getObject ( 'manager' ) -> getClass ( $ identifier ) ; if ( ! $ class || ! array_key_exists ( 'KFilesystemStreamInterface' , class_implements ( $ class ) ) ) { throw new UnexpectedValueException ( 'Stream: ' . $ identifier . ' does not implement KFilesystemStreamInterface' ) ; } $ name = $ class :: getName ( ) ; if ( ! empty ( $ name ) && ! $ this -> isRegistered ( $ this -> _stream_prefix . $ name ) ) { if ( $ result = stream_wrapper_register ( $ this -> _stream_prefix . $ name , 'KFilesystemStreamAdapter' ) ) { $ this -> __streams [ $ this -> _stream_prefix . $ name ] = $ identifier ; } } return $ result ; }
Register a stream

Function prevents from registering the stream twice.
If stream_prefix config option is set, the registered stream will be prefixed and createStream should be called
with the prefix.

@param string $identifier A stream identifier string
@throws UnexpectedValueException
@return bool Returns TRUE on success, FALSE on failure.
Register a stream