public function call(callable $callback): Response
    {
        foreach (self::METADATA_KEYS as $incomingKey => $metadataKey) {
            if (array_key_exists($incomingKey, $_SERVER)) {
                $this->metadata[$metadataKey] = ['' . $_SERVER[$incomingKey]];
            }
            if (array_key_exists($incomingKey, $_REQUEST)) {
                $this->metadata[$metadataKey] = ['' . $_REQUEST[$incomingKey]];
            }
        }
        $response = $callback();
        return $response;
    }
public function call(callable $callback): Response
    {
        foreach (self::METADATA_KEYS as $incomingKey => $metadataKey) {
            if (array_key_exists($incomingKey, $_SERVER)) {
                $this->metadata[$metadataKey] = ['' . $_SERVER[$incomingKey]];
            }
            if (array_key_exists($incomingKey, $_REQUEST)) {
                $this->metadata[$metadataKey] = ['' . $_REQUEST[$incomingKey]];
            }
        }
        $response = $callback();
        return $response;
    }
public function call ( callable $ callback ) : Response { foreach ( self :: METADATA_KEYS as $ incomingKey => $ metadataKey ) { if ( array_key_exists ( $ incomingKey , $ _SERVER ) ) { $ this -> metadata [ $ metadataKey ] = [ '' . $ _SERVER [ $ incomingKey ] ] ; } if ( array_key_exists ( $ incomingKey , $ _REQUEST ) ) { $ this -> metadata [ $ metadataKey ] = [ '' . $ _REQUEST [ $ incomingKey ] ] ; } } $ response = $ callback ( ) ; return $ response ; }
gRPC requires metadata keys to be as a string. Also, the PHP gRPC library expects them in an array.

@param callable $callback
@return Response
gRPC requires metadata keys to be as a string . Also the PHP gRPC library expects them in an array .