Datastore/src/Query/GqlQuery.php
private function mapBindings($bindingType, array $bindings)
    {
        $res = [];
        foreach ($bindings as $key => $binding) {
            if ($binding instanceof Cursor) {
                $value = [
                    'cursor' => $binding->cursor()
                ];
            } else {
                $value = [
                    'value' => $this->entityMapper->valueObject($binding)
                ];
            }

            if ($bindingType === self::BINDING_NAMED) {
                $res[$key] = $value;
            } else {
                $res[] = $value;
            }
        }

        return $res;
    }
private function mapBindings($bindingType, array $bindings)
    {
        $res = [];
        foreach ($bindings as $key => $binding) {
            if ($binding instanceof Cursor) {
                $value = [
                    'cursor' => $binding->cursor()
                ];
            } else {
                $value = [
                    'value' => $this->entityMapper->valueObject($binding)
                ];
            }

            if ($bindingType === self::BINDING_NAMED) {
                $res[$key] = $value;
            } else {
                $res[] = $value;
            }
        }

        return $res;
    }
private function mapBindings ( $ bindingType , array $ bindings ) { $ res = [ ] ; foreach ( $ bindings as $ key => $ binding ) { if ( $ binding instanceof Cursor ) { $ value = [ 'cursor' => $ binding -> cursor ( ) ] ; } else { $ value = [ 'value' => $ this -> entityMapper -> valueObject ( $ binding ) ] ; } if ( $ bindingType === self :: BINDING_NAMED ) { $ res [ $ key ] = $ value ; } else { $ res [ ] = $ value ; } } return $ res ; }
Format bound values for the API

@param string $bindingType Either named or positional bindings.
@param array $bindings The bindings to map
@return array
Format bound values for the API