src/Query.php
public function setupJoinTables($join = 'all')
        {
            if (is_array($join)) {
                foreach ($join as $join_column) {
                    $foreign_table = $this->table->getForeignTableByLocalColumn($join_column);
                    $this->join($foreign_table->getTable(), $foreign_table->getKeyColumnName(), $this->table->getB2DBAlias() . '.' . $foreign_table->getColumnName());
                }
            } elseif (!is_array($join) && $join == 'all') {
                foreach ($this->table->getForeignTables() as $foreign_table) {
                    $this->join($foreign_table->getTable(), $foreign_table->getKeyColumnName(), $this->table->getB2DBAlias() . '.' . $foreign_table->getColumnName());
                }
            }
        }
public function setupJoinTables($join = 'all')
        {
            if (is_array($join)) {
                foreach ($join as $join_column) {
                    $foreign_table = $this->table->getForeignTableByLocalColumn($join_column);
                    $this->join($foreign_table->getTable(), $foreign_table->getKeyColumnName(), $this->table->getB2DBAlias() . '.' . $foreign_table->getColumnName());
                }
            } elseif (!is_array($join) && $join == 'all') {
                foreach ($this->table->getForeignTables() as $foreign_table) {
                    $this->join($foreign_table->getTable(), $foreign_table->getKeyColumnName(), $this->table->getB2DBAlias() . '.' . $foreign_table->getColumnName());
                }
            }
        }
public function setupJoinTables ( $ join = 'all' ) { if ( is_array ( $ join ) ) { foreach ( $ join as $ join_column ) { $ foreign_table = $ this -> table -> getForeignTableByLocalColumn ( $ join_column ) ; $ this -> join ( $ foreign_table -> getTable ( ) , $ foreign_table -> getKeyColumnName ( ) , $ this -> table -> getB2DBAlias ( ) . '.' . $ foreign_table -> getColumnName ( ) ) ; } } elseif ( ! is_array ( $ join ) && $ join == 'all' ) { foreach ( $ this -> table -> getForeignTables ( ) as $ foreign_table ) { $ this -> join ( $ foreign_table -> getTable ( ) , $ foreign_table -> getKeyColumnName ( ) , $ this -> table -> getB2DBAlias ( ) . '.' . $ foreign_table -> getColumnName ( ) ) ; } } }
Add all available foreign tables

@param array|string|bool $join [optional]
Add all available foreign tables