src/PSR7Client.php
protected function configureServer(array $ctx): array
    {
        $server = $this->originalServer;
        $server['REQUEST_TIME'] = time();
        $server['REQUEST_TIME_FLOAT'] = microtime(true);
        $server['REMOTE_ADDR'] = $ctx['attributes']['ipAddress'] ?? $ctx['remoteAddr'] ?? '127.0.0.1';

        $server['HTTP_USER_AGENT'] = '';
        foreach ($ctx['headers'] as $key => $value) {
            $key = strtoupper(str_replace('-', '_', $key));
            if (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH'])) {
                $server[$key] = implode(', ', $value);
            } else {
                $server['HTTP_' . $key] = implode(', ', $value);
            }
        }

        return $server;
    }
protected function configureServer(array $ctx): array
    {
        $server = $this->originalServer;
        $server['REQUEST_TIME'] = time();
        $server['REQUEST_TIME_FLOAT'] = microtime(true);
        $server['REMOTE_ADDR'] = $ctx['attributes']['ipAddress'] ?? $ctx['remoteAddr'] ?? '127.0.0.1';

        $server['HTTP_USER_AGENT'] = '';
        foreach ($ctx['headers'] as $key => $value) {
            $key = strtoupper(str_replace('-', '_', $key));
            if (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH'])) {
                $server[$key] = implode(', ', $value);
            } else {
                $server['HTTP_' . $key] = implode(', ', $value);
            }
        }

        return $server;
    }
protected function configureServer ( array $ ctx ) : array { $ server = $ this -> originalServer ; $ server [ 'REQUEST_TIME' ] = time ( ) ; $ server [ 'REQUEST_TIME_FLOAT' ] = microtime ( true ) ; $ server [ 'REMOTE_ADDR' ] = $ ctx [ 'attributes' ] [ 'ipAddress' ] ?? $ ctx [ 'remoteAddr' ] ?? '127.0.0.1' ; $ server [ 'HTTP_USER_AGENT' ] = '' ; foreach ( $ ctx [ 'headers' ] as $ key => $ value ) { $ key = strtoupper ( str_replace ( '-' , '_' , $ key ) ) ; if ( \ in_array ( $ key , [ 'CONTENT_TYPE' , 'CONTENT_LENGTH' ] ) ) { $ server [ $ key ] = implode ( ', ' , $ value ) ; } else { $ server [ 'HTTP_' . $ key ] = implode ( ', ' , $ value ) ; } } return $ server ; }
Returns altered copy of _SERVER variable. Sets ip-address,
request-time and other values.

@param array $ctx
@return array
Returns altered copy of _SERVER variable . Sets ip - address request - time and other values .