src/S3/StreamWrapper.php
private function getOptions($removeContextData = false)
    {
        // Context is not set when doing things like stat
        if ($this->context === null) {
            $options = [];
        } else {
            $options = stream_context_get_options($this->context);
            $options = isset($options[$this->protocol])
                ? $options[$this->protocol]
                : [];
        }

        $default = stream_context_get_options(stream_context_get_default());
        $default = isset($default[$this->protocol])
            ? $default[$this->protocol]
            : [];
        $result = $this->params + $options + $default;

        if ($removeContextData) {
            unset($result['client'], $result['seekable'], $result['cache']);
        }

        return $result;
    }
private function getOptions($removeContextData = false)
    {
        // Context is not set when doing things like stat
        if ($this->context === null) {
            $options = [];
        } else {
            $options = stream_context_get_options($this->context);
            $options = isset($options[$this->protocol])
                ? $options[$this->protocol]
                : [];
        }

        $default = stream_context_get_options(stream_context_get_default());
        $default = isset($default[$this->protocol])
            ? $default[$this->protocol]
            : [];
        $result = $this->params + $options + $default;

        if ($removeContextData) {
            unset($result['client'], $result['seekable'], $result['cache']);
        }

        return $result;
    }
private function getOptions ( $ removeContextData = false ) { // Context is not set when doing things like stat if ( $ this -> context === null ) { $ options = [ ] ; } else { $ options = stream_context_get_options ( $ this -> context ) ; $ options = isset ( $ options [ $ this -> protocol ] ) ? $ options [ $ this -> protocol ] : [ ] ; } $ default = stream_context_get_options ( stream_context_get_default ( ) ) ; $ default = isset ( $ default [ $ this -> protocol ] ) ? $ default [ $ this -> protocol ] : [ ] ; $ result = $ this -> params + $ options + $ default ; if ( $ removeContextData ) { unset ( $ result [ 'client' ] , $ result [ 'seekable' ] , $ result [ 'cache' ] ) ; } return $ result ; }
Get the stream context options available to the current stream

@param bool $removeContextData Set to true to remove contextual kvp's
like 'client' from the result.

@return array
Get the stream context options available to the current stream