public function clearProxySettings($wrapper = null)
    {
        $wrappers = isset($wrapper) ? array($wrapper) : array_keys($this->_streamContextOptions);

        $clearedWrappers = array();
        $options = array('proxy', 'request_fulluri', 'header');
        foreach ($wrappers as $wrapper) {

            // remove wrapper options related to proxy settings
            if (isset($this->_streamContextOptions[$wrapper]['proxy'])) {
                foreach ($options as $option){
                    unset($this->_streamContextOptions[$wrapper][$option]);
                }

                // remove wrapper entry if there are no other options left
                if (empty($this->_streamContextOptions[$wrapper])) {
                    unset($this->_streamContextOptions[$wrapper]);
                }

                $clearedWrappers[] = $wrapper;
            }
        }

        return $clearedWrappers;
    }
public function clearProxySettings($wrapper = null)
    {
        $wrappers = isset($wrapper) ? array($wrapper) : array_keys($this->_streamContextOptions);

        $clearedWrappers = array();
        $options = array('proxy', 'request_fulluri', 'header');
        foreach ($wrappers as $wrapper) {

            // remove wrapper options related to proxy settings
            if (isset($this->_streamContextOptions[$wrapper]['proxy'])) {
                foreach ($options as $option){
                    unset($this->_streamContextOptions[$wrapper][$option]);
                }

                // remove wrapper entry if there are no other options left
                if (empty($this->_streamContextOptions[$wrapper])) {
                    unset($this->_streamContextOptions[$wrapper]);
                }

                $clearedWrappers[] = $wrapper;
            }
        }

        return $clearedWrappers;
    }
public function clearProxySettings ( $ wrapper = null ) { $ wrappers = isset ( $ wrapper ) ? array ( $ wrapper ) : array_keys ( $ this -> _streamContextOptions ) ; $ clearedWrappers = array ( ) ; $ options = array ( 'proxy' , 'request_fulluri' , 'header' ) ; foreach ( $ wrappers as $ wrapper ) { // remove wrapper options related to proxy settings if ( isset ( $ this -> _streamContextOptions [ $ wrapper ] [ 'proxy' ] ) ) { foreach ( $ options as $ option ) { unset ( $ this -> _streamContextOptions [ $ wrapper ] [ $ option ] ) ; } // remove wrapper entry if there are no other options left if ( empty ( $ this -> _streamContextOptions [ $ wrapper ] ) ) { unset ( $ this -> _streamContextOptions [ $ wrapper ] ) ; } $ clearedWrappers [ ] = $ wrapper ; } } return $ clearedWrappers ; }
Clear proxy settings from the stream context options array.

@param string $wrapper Remove settings from this wrapper only

@return array Wrappers cleared
Clear proxy settings from the stream context options array .