src/stream/Request.php
protected function convertContextOptions(array $options)
    {
        $contextOptions = [];
        foreach ($options as $key => $value) {
            $section = 'http';
            if (strpos($key, 'ssl') === 0) {
                $section = 'ssl';
                $key = substr($key, 3);
            }
            $key = Inflector::underscore($key);
            $contextOptions[$section][$key] = $value;
        }

        return $contextOptions;
    }
protected function convertContextOptions(array $options)
    {
        $contextOptions = [];
        foreach ($options as $key => $value) {
            $section = 'http';
            if (strpos($key, 'ssl') === 0) {
                $section = 'ssl';
                $key = substr($key, 3);
            }
            $key = Inflector::underscore($key);
            $contextOptions[$section][$key] = $value;
        }

        return $contextOptions;
    }
protected function convertContextOptions ( array $ options ) { $ contextOptions = [ ] ; foreach ( $ options as $ key => $ value ) { $ section = 'http' ; if ( strpos ( $ key , 'ssl' ) === 0 ) { $ section = 'ssl' ; $ key = substr ( $ key , 3 ) ; } $ key = Inflector :: underscore ( $ key ) ; $ contextOptions [ $ section ] [ $ key ] = $ value ; } return $ contextOptions ; }
Composes stream context options from raw options.
@param array $options raw options
@return array stream context options
Composes stream context options from raw options .