Spanner/src/Operation.php
private function flattenKeySet(KeySet $keySet)
    {
        $keys = $keySet->keySetObject();

        if (!empty($keys['ranges'])) {
            foreach ($keys['ranges'] as $index => $range) {
                foreach ($range as $type => $rangeKeys) {
                    $range[$type] = $this->mapper->encodeValuesAsSimpleType($rangeKeys);
                }

                $keys['ranges'][$index] = $range;
            }
        }

        if (!empty($keys['keys'])) {
            $keys['keys'] = $this->mapper->encodeValuesAsSimpleType($keys['keys'], true);
        }

        return $this->arrayFilterRemoveNull($keys);
    }
private function flattenKeySet(KeySet $keySet)
    {
        $keys = $keySet->keySetObject();

        if (!empty($keys['ranges'])) {
            foreach ($keys['ranges'] as $index => $range) {
                foreach ($range as $type => $rangeKeys) {
                    $range[$type] = $this->mapper->encodeValuesAsSimpleType($rangeKeys);
                }

                $keys['ranges'][$index] = $range;
            }
        }

        if (!empty($keys['keys'])) {
            $keys['keys'] = $this->mapper->encodeValuesAsSimpleType($keys['keys'], true);
        }

        return $this->arrayFilterRemoveNull($keys);
    }
private function flattenKeySet ( KeySet $ keySet ) { $ keys = $ keySet -> keySetObject ( ) ; if ( ! empty ( $ keys [ 'ranges' ] ) ) { foreach ( $ keys [ 'ranges' ] as $ index => $ range ) { foreach ( $ range as $ type => $ rangeKeys ) { $ range [ $ type ] = $ this -> mapper -> encodeValuesAsSimpleType ( $ rangeKeys ) ; } $ keys [ 'ranges' ] [ $ index ] = $ range ; } } if ( ! empty ( $ keys [ 'keys' ] ) ) { $ keys [ 'keys' ] = $ this -> mapper -> encodeValuesAsSimpleType ( $ keys [ 'keys' ] , true ) ; } return $ this -> arrayFilterRemoveNull ( $ keys ) ; }
Convert a KeySet object to an API-ready array.

@param KeySet $keySet The keySet object.
@return array [KeySet](https://cloud.google.com/spanner/reference/rpc/google.spanner.v1#keyset)
Convert a KeySet object to an API - ready array .