src/mako/database/query/Join.php
public function on($column1, ?string $operator = null, $column2 = null, string $separator = 'AND'): Join
	{
		if($column1 instanceof Closure)
		{
			$join = new self;

			$column1($join);

			$this->conditions[] =
			[
				'type'      => 'nestedJoinCondition',
				'join'      => $join,
				'separator' => $separator,
			];
		}
		else
		{
			$this->conditions[] =
			[
				'type'      => 'joinCondition',
				'column1'   => $column1,
				'operator'  => $operator,
				'column2'   => $column2,
				'separator' => $separator,
			];
		}

		return $this;
	}
public function on($column1, ?string $operator = null, $column2 = null, string $separator = 'AND'): Join
	{
		if($column1 instanceof Closure)
		{
			$join = new self;

			$column1($join);

			$this->conditions[] =
			[
				'type'      => 'nestedJoinCondition',
				'join'      => $join,
				'separator' => $separator,
			];
		}
		else
		{
			$this->conditions[] =
			[
				'type'      => 'joinCondition',
				'column1'   => $column1,
				'operator'  => $operator,
				'column2'   => $column2,
				'separator' => $separator,
			];
		}

		return $this;
	}
public function on ( $ column1 , ? string $ operator = null , $ column2 = null , string $ separator = 'AND' ) : Join { if ( $ column1 instanceof Closure ) { $ join = new self ; $ column1 ( $ join ) ; $ this -> conditions [ ] = [ 'type' => 'nestedJoinCondition' , 'join' => $ join , 'separator' => $ separator , ] ; } else { $ this -> conditions [ ] = [ 'type' => 'joinCondition' , 'column1' => $ column1 , 'operator' => $ operator , 'column2' => $ column2 , 'separator' => $ separator , ] ; } return $ this ; }
Adds a ON condition to the join.

@param  string                                $column1   Column name
@param  string|null                           $operator  Operator
@param  string|\mako\database\query\Raw||null $column2   Column name
@param  string                                $separator Condition separator
@return \mako\database\query\Join
Adds a ON condition to the join .