src/SQL/Compiler.php
protected function handleJoins(array $joins)
    {
        if (empty($joins)) {
            return '';
        }
        $sql = [];
        foreach ($joins as $join) {
            /** @var Join $joinObject */
            $joinObject = $join['join'];

            $on = '';
            if ($joinObject) {
                $on = $this->handleJoinConditions($joinObject->getJoinConditions());
            }
            if ($on !== '') {
                $on = ' ON ' . $on;
            }

            $sql[] = $join['type'] . ' JOIN ' . $this->handleTables($join['table']) . $on;
        }
        return ' ' . implode(' ', $sql);
    }
protected function handleJoins(array $joins)
    {
        if (empty($joins)) {
            return '';
        }
        $sql = [];
        foreach ($joins as $join) {
            /** @var Join $joinObject */
            $joinObject = $join['join'];

            $on = '';
            if ($joinObject) {
                $on = $this->handleJoinConditions($joinObject->getJoinConditions());
            }
            if ($on !== '') {
                $on = ' ON ' . $on;
            }

            $sql[] = $join['type'] . ' JOIN ' . $this->handleTables($join['table']) . $on;
        }
        return ' ' . implode(' ', $sql);
    }
protected function handleJoins ( array $ joins ) { if ( empty ( $ joins ) ) { return '' ; } $ sql = [ ] ; foreach ( $ joins as $ join ) { /** @var Join $joinObject */ $ joinObject = $ join [ 'join' ] ; $ on = '' ; if ( $ joinObject ) { $ on = $ this -> handleJoinConditions ( $ joinObject -> getJoinConditions ( ) ) ; } if ( $ on !== '' ) { $ on = ' ON ' . $ on ; } $ sql [ ] = $ join [ 'type' ] . ' JOIN ' . $ this -> handleTables ( $ join [ 'table' ] ) . $ on ; } return ' ' . implode ( ' ' , $ sql ) ; }
Handle JOIN clauses

@param   array $joins

@return  string
Handle JOIN clauses