src/Query/QQ.php
public static function extractSelectClause($objClauses)
    {
        if ($objClauses instanceof Clause\Select) {
            return $objClauses;
        }

        if (is_array($objClauses)) {
            $hasSelects = false;
            $objSelect = QQ::select();
            foreach ($objClauses as $objClause) {
                if ($objClause instanceof Clause\Select) {
                    $hasSelects = true;
                    $objSelect->merge($objClause);
                }
            }
            if (!$hasSelects) {
                return null;
            }
            return $objSelect;
        }
        return null;
    }
public static function extractSelectClause($objClauses)
    {
        if ($objClauses instanceof Clause\Select) {
            return $objClauses;
        }

        if (is_array($objClauses)) {
            $hasSelects = false;
            $objSelect = QQ::select();
            foreach ($objClauses as $objClause) {
                if ($objClause instanceof Clause\Select) {
                    $hasSelects = true;
                    $objSelect->merge($objClause);
                }
            }
            if (!$hasSelects) {
                return null;
            }
            return $objSelect;
        }
        return null;
    }
public static function extractSelectClause ( $ objClauses ) { if ( $ objClauses instanceof Clause \ Select ) { return $ objClauses ; } if ( is_array ( $ objClauses ) ) { $ hasSelects = false ; $ objSelect = QQ :: select ( ) ; foreach ( $ objClauses as $ objClause ) { if ( $ objClause instanceof Clause \ Select ) { $ hasSelects = true ; $ objSelect -> merge ( $ objClause ) ; } } if ( ! $ hasSelects ) { return null ; } return $ objSelect ; } return null ; }
Searches for all the Clause\Select clauses and merges them into one clause and returns that clause.
Returns null if none found.

@param Clause\Base[]|Clause\Base|null $objClauses Clause\Base object or array of Clause\Base objects
@return Clause\Select Clause\Select clause containing all the nodes from all the Clause\Select clauses from $objClauses,
or null if $objClauses contains no Clause\Select clauses
Searches for all the Clause \ Select clauses and merges them into one clause and returns that clause . Returns null if none found .