Spanner/src/ValueMapper.php
public function encodeValuesAsSimpleType(array $values, $allowMixedArrayType = false)
    {
        $res = [];
        foreach ($values as $value) {
            $type = null;
            $definition = null;
            if (is_array($value) && (empty($value) || !$this->isAssoc($value))) {
                $type = Database::TYPE_ARRAY;
                $definition = new ArrayType(null);
            }

            $res[] = $this->paramType($value, $type, $definition, $allowMixedArrayType)[0];
        }

        return $res;
    }
public function encodeValuesAsSimpleType(array $values, $allowMixedArrayType = false)
    {
        $res = [];
        foreach ($values as $value) {
            $type = null;
            $definition = null;
            if (is_array($value) && (empty($value) || !$this->isAssoc($value))) {
                $type = Database::TYPE_ARRAY;
                $definition = new ArrayType(null);
            }

            $res[] = $this->paramType($value, $type, $definition, $allowMixedArrayType)[0];
        }

        return $res;
    }
public function encodeValuesAsSimpleType ( array $ values , $ allowMixedArrayType = false ) { $ res = [ ] ; foreach ( $ values as $ value ) { $ type = null ; $ definition = null ; if ( is_array ( $ value ) && ( empty ( $ value ) || ! $ this -> isAssoc ( $ value ) ) ) { $ type = Database :: TYPE_ARRAY ; $ definition = new ArrayType ( null ) ; } $ res [ ] = $ this -> paramType ( $ value , $ type , $ definition , $ allowMixedArrayType ) [ 0 ] ; } return $ res ; }
Accepts a list of values and encodes the value into a format accepted by
the Spanner API.

@param array $values The list of values
@param bool $allowMixedArrayType If true, array values may be of mixed type.
**Defaults to** `false`.
@return array The encoded values
Accepts a list of values and encodes the value into a format accepted by the Spanner API .