public function addJoin(array $joins): void
    {
        if (empty($joins)) {
            return;
        }

        foreach ($joins as $join) {
            $keyword = strtoupper($join['type']);
            $pattern = '%s JOIN %s ON %s %s %s';
            $this->statement .= sprintf(
                $pattern,
                $keyword,
                $this->quoteName($join['table']),
                $this->quoteName($join['key']),
                $join['operator'],
                $this->quoteName($join['value'])
            );
            $this->statement .= PHP_EOL;
        }
    }
public function addJoin(array $joins): void
    {
        if (empty($joins)) {
            return;
        }

        foreach ($joins as $join) {
            $keyword = strtoupper($join['type']);
            $pattern = '%s JOIN %s ON %s %s %s';
            $this->statement .= sprintf(
                $pattern,
                $keyword,
                $this->quoteName($join['table']),
                $this->quoteName($join['key']),
                $join['operator'],
                $this->quoteName($join['value'])
            );
            $this->statement .= PHP_EOL;
        }
    }
public function addJoin ( array $ joins ) : void { if ( empty ( $ joins ) ) { return ; } foreach ( $ joins as $ join ) { $ keyword = strtoupper ( $ join [ 'type' ] ) ; $ pattern = '%s JOIN %s ON %s %s %s' ; $ this -> statement .= sprintf ( $ pattern , $ keyword , $ this -> quoteName ( $ join [ 'table' ] ) , $ this -> quoteName ( $ join [ 'key' ] ) , $ join [ 'operator' ] , $ this -> quoteName ( $ join [ 'value' ] ) ) ; $ this -> statement .= PHP_EOL ; } }
Adds joins to SQL statement.

@param array $joins
@return void
Adds joins to SQL statement .