src/Manipulation/JoinQuery.php
public function addJoin(Select $select, $selfColumn, $refColumn)
    {
        $select->isJoin(true);
        $table = $select->getTable()->getName();

        if (!isset($this->joins[$table])) {
            if (!$selfColumn instanceof Column) {
                $newColumn = array($selfColumn);
                $selfColumn = SyntaxFactory::createColumn(
                    $newColumn,
                    $this->select->getTable()
                );
            }

            $select->joinCondition()->equals($refColumn, $selfColumn);
            $this->joins[$table] = $select;
        }

        return $this->joins[$table];
    }
public function addJoin(Select $select, $selfColumn, $refColumn)
    {
        $select->isJoin(true);
        $table = $select->getTable()->getName();

        if (!isset($this->joins[$table])) {
            if (!$selfColumn instanceof Column) {
                $newColumn = array($selfColumn);
                $selfColumn = SyntaxFactory::createColumn(
                    $newColumn,
                    $this->select->getTable()
                );
            }

            $select->joinCondition()->equals($refColumn, $selfColumn);
            $this->joins[$table] = $select;
        }

        return $this->joins[$table];
    }
@param Select $select
@param mixed  $selfColumn
@param mixed  $refColumn

@return Select