src/Wandu/Http/Factory/ServerRequestFactory.php
protected function getPhpServerValuesFromPlainHeader(array $plainHeaders)
    {
        $httpInformation = explode(' ', array_shift($plainHeaders));
        $servers = [
            'REQUEST_METHOD' => $httpInformation[0],
            'REQUEST_URI' => $httpInformation[1],
            'SERVER_PROTOCOL' => $httpInformation[2],
        ];
        foreach ($plainHeaders as $plainHeader) {
            list($key, $value) = array_map('trim', explode(':', $plainHeader, 2));
            $servers['HTTP_' . strtoupper(str_replace('-', '_', $key))] = $value;
        }
        return $servers;
    }
protected function getPhpServerValuesFromPlainHeader(array $plainHeaders)
    {
        $httpInformation = explode(' ', array_shift($plainHeaders));
        $servers = [
            'REQUEST_METHOD' => $httpInformation[0],
            'REQUEST_URI' => $httpInformation[1],
            'SERVER_PROTOCOL' => $httpInformation[2],
        ];
        foreach ($plainHeaders as $plainHeader) {
            list($key, $value) = array_map('trim', explode(':', $plainHeader, 2));
            $servers['HTTP_' . strtoupper(str_replace('-', '_', $key))] = $value;
        }
        return $servers;
    }
protected function getPhpServerValuesFromPlainHeader ( array $ plainHeaders ) { $ httpInformation = explode ( ' ' , array_shift ( $ plainHeaders ) ) ; $ servers = [ 'REQUEST_METHOD' => $ httpInformation [ 0 ] , 'REQUEST_URI' => $ httpInformation [ 1 ] , 'SERVER_PROTOCOL' => $ httpInformation [ 2 ] , ] ; foreach ( $ plainHeaders as $ plainHeader ) { list ( $ key , $ value ) = array_map ( 'trim' , explode ( ':' , $ plainHeader , 2 ) ) ; $ servers [ 'HTTP_' . strtoupper ( str_replace ( '-' , '_' , $ key ) ) ] = $ value ; } return $ servers ; }
Parse plain headers.

@param array $plainHeaders
@return array
Parse plain headers .