Firestore/src/Query.php
private function newQuery(array $additionalConfig, $overrideTopLevelKeys = false)
    {
        $query = $this->query;

        if ($overrideTopLevelKeys) {
            $keys = array_keys($additionalConfig);
            foreach ($keys as $key) {
                unset($query[$key]);
            }
        }

        $query = $this->arrayMergeRecursive($query, $additionalConfig);

        return new self(
            $this->connection,
            $this->valueMapper,
            $this->parent,
            $query
        );
    }
private function newQuery(array $additionalConfig, $overrideTopLevelKeys = false)
    {
        $query = $this->query;

        if ($overrideTopLevelKeys) {
            $keys = array_keys($additionalConfig);
            foreach ($keys as $key) {
                unset($query[$key]);
            }
        }

        $query = $this->arrayMergeRecursive($query, $additionalConfig);

        return new self(
            $this->connection,
            $this->valueMapper,
            $this->parent,
            $query
        );
    }
private function newQuery ( array $ additionalConfig , $ overrideTopLevelKeys = false ) { $ query = $ this -> query ; if ( $ overrideTopLevelKeys ) { $ keys = array_keys ( $ additionalConfig ) ; foreach ( $ keys as $ key ) { unset ( $ query [ $ key ] ) ; } } $ query = $ this -> arrayMergeRecursive ( $ query , $ additionalConfig ) ; return new self ( $ this -> connection , $ this -> valueMapper , $ this -> parent , $ query ) ; }
Create a new Query instance

@param array $additionalConfig
@param bool $overrideTopLevelKeys If true, top-level keys will be replaced
rather than recursively merged.
@return Query A new instance of Query with the given changes applied.
Create a new Query instance