function addJoin($table_or_column, $on_clause_or_column = null, $join_type = self::JOIN) {
		if ($table_or_column instanceof QueryJoin) {
			$this->joins[] = clone $table_or_column;
			return $this;
		}

		if (null === $on_clause_or_column) {
			if ($join_type == self::JOIN || $join_type == self::INNER_JOIN) {
				$this->addTable($table_or_column);
				return $this;
			}
			$on_clause_or_column = '1 = 1';
		}

		$this->joins[] = new QueryJoin($table_or_column, $on_clause_or_column, $join_type);
		return $this;
	}
function addJoin($table_or_column, $on_clause_or_column = null, $join_type = self::JOIN) {
		if ($table_or_column instanceof QueryJoin) {
			$this->joins[] = clone $table_or_column;
			return $this;
		}

		if (null === $on_clause_or_column) {
			if ($join_type == self::JOIN || $join_type == self::INNER_JOIN) {
				$this->addTable($table_or_column);
				return $this;
			}
			$on_clause_or_column = '1 = 1';
		}

		$this->joins[] = new QueryJoin($table_or_column, $on_clause_or_column, $join_type);
		return $this;
	}
function addJoin ( $ table_or_column , $ on_clause_or_column = null , $ join_type = self :: JOIN ) { if ( $ table_or_column instanceof QueryJoin ) { $ this -> joins [ ] = clone $ table_or_column ; return $ this ; } if ( null === $ on_clause_or_column ) { if ( $ join_type == self :: JOIN || $ join_type == self :: INNER_JOIN ) { $ this -> addTable ( $ table_or_column ) ; return $ this ; } $ on_clause_or_column = '1 = 1' ; } $ this -> joins [ ] = new QueryJoin ( $ table_or_column , $ on_clause_or_column , $ join_type ) ; return $ this ; }
Add a JOIN to the query.

@todo Support the ON clause being NULL correctly
@param string|Query $table_or_column Table to join on
@param string|Condition $on_clause_or_column ON clause to join with
@param string $join_type Type of JOIN to perform
@return Query
Add a JOIN to the query .