@param DOMElement $join

@return void
506479
protected function init(DOMElement $join)
    {
        $this->parseId($join);

        $conditionNodes = XmlUtil::getChildElements($join, 'conditions');
        foreach ($conditionNodes as $condition) {
            $conditionDescriptor = DescriptorFactory::getFactory()->createConditionsDescriptor($condition);
            $conditionDescriptor->setParent($conditionDescriptor);
            $this->conditions->attach($conditionDescriptor);
        }

        $resultElement = XMLUtil::getChildElement($join, 'unconditional-result');
        if (null !== $resultElement) {
            $result = new ResultDescriptor($resultElement);
            $result->setParent($this);
            $this->setResult($result);
        }
    }
1009299
public function join($element)
	{
		if($element->slave!==null)
			$this->join($element->slave);
		if(!empty($element->relation->select))
			$this->selects[]=$element->getColumnSelect($element->relation->select);
		$this->conditions[]=$element->relation->condition;
		$this->orders[]=$element->relation->order;
		$this->joins[]=$element->getJoinCondition();
		$this->joins[]=$element->relation->join;
		$this->groups[]=$element->relation->group;
		$this->havings[]=$element->relation->having;

		if(is_array($element->relation->params))
		{
			if(is_array($this->params))
				$this->params=array_merge($this->params,$element->relation->params);
			else
				$this->params=$element->relation->params;
		}
		$this->elements[$element->id]=true;
	}
479836
protected function addSequentialNode(DOMElement $element, $value): void
    {
        if (empty($element->nodeValue)) {
            $element->nodeValue = \htmlspecialchars($value);
            return;
        }

        $child = $this->element($element->nodeName);
        $child->nodeValue = \htmlspecialchars($value);
        $element->parentNode->appendChild($child);
    }
1251675
private function build_join( $join ) {
		$sql = '';
		if ( ! empty( $join ) ) {
			$items = [];
			foreach ( $join as $data ) {
				if ( ! is_array( $data ) || count( $data ) < 3 ) {
					continue;
				}
				$table = $data[0];
				$rule  = $data[1];
				$rule  = strtoupper( $rule );
				if ( ! in_array( $rule, [
					'JOIN',
					'INNER JOIN',
					'LEFT JOIN',
					'RIGHT JOIN',
				] ) ) {
					continue;
				}

				$conditions = $data[2];
				if ( empty( $conditions ) ) {
					continue;
				}
				$check = reset( $conditions );
				if ( ! is_array( $check ) ) {
					$conditions = [ $conditions ];
				}
				$values = [];
				foreach ( $conditions as $condition ) {
					if ( ! is_array( $condition ) || count( $condition ) < 3 ) {
						continue;
					}
					$left     = $condition[0];
					$op       = $condition[1];
					$right    = $condition[2];
					$values[] = $this->get_field_name( $left, null ) . " $op " . $this->get_field_name( $right, null );
				}
				if ( ! empty( $values ) ) {
					$as = null;
					if ( is_array( $table ) && count( $table ) > 1 ) {
						$as    = $table[1];
						$table = $table[0];
					}
					$items[] = $rule . ' ' . $this->get_table( $table ) . ( isset( $as ) ? " AS $as" : '' ) . ' ON ' . implode( ' AND ', $values );
				}
			}
			if ( ! empty( $items ) ) {
				$sql .= ' ' . implode( ' ', $items );
			}
		}

		return $sql;
	}
1297525
public function leftJoin($join, $on = null)
    {
        $this->getJoins()->leftJoin($join, $on);

        return $this;
    }
549832
public function joinString($join=null, $glue=", ")
    {
        $join = LambdaUtils::toSelectCallable($join);
        $temp = $this->select($join)->toArray();
        return implode($glue, $temp);
    }
745879
protected function init(DOMElement $split)
    {
        $this->parseId($split);

        $uResults = XMLUtil::getChildElements($split, 'unconditional-result');

        foreach ($uResults as $result) {
            $resultDescriptor = new ResultDescriptor($result);
            $resultDescriptor->setParent($this);
            $this->results->attach($resultDescriptor);
        }
    }
1051142
public function setJoinMap(JoinMap $joinMap)
    {
        if ($this->joinMap) {
            $this->joinMap->merge($joinMap);

        } else {
            $this->joinMap = $joinMap;
        }

        return $this;
    }
1098320
public function setDOM(DOMElement $element)
    {
        $this->_element = $this->_element->ownerDocument->importNode($element, true);
    }
343485
public function addJoin($join)
    {
        if (!$this->joins->contains($join)) {
            $this->joins[] = $join;
        }

        return $this;
    }
235641
public function buildJoinCondition(Criteria $c)
    {
        $joinCondition = null;
        for ($i = 0; $i < $this->count; $i++) {
            $criterion = $c->getNewCriterion($this->getLeftColumn($i), $this->getLeftColumn($i) . $this->getOperator($i) . $this->getRightColumn($i), Criteria::CUSTOM);
            if (null === $joinCondition) {
                $joinCondition = $criterion;
            } else {
                $joinCondition = $joinCondition->addAnd($criterion);
            }
        }
        $this->joinCondition = $joinCondition;
    }
331595
public function innerJoin($join, $alias)
    {
        if (!in_array($alias, $this->joins)) {
            $this->queryBuilder->innerJoin($join, $alias);
            array_push($this->joins, $alias);
        }

        return $this;
    }
148362
public function cleanHeaders(\DOMElement $e)
    {
        for ($headerIndex = 1; $headerIndex < 3; ++$headerIndex) {
            $headers = $e->getElementsByTagName('h' . $headerIndex);

            for ($i = $headers->length - 1; $i >= 0; --$i) {
                if ($this->getWeight($headers->item($i)) < 0 || $this->getLinkDensity($headers->item($i)) > 0.33) {
                    $headers->item($i)->parentNode->removeChild($headers->item($i));
                }
            }
        }
    }
670825
public function joins($joins)
    {
        $this->joins = [];
        foreach ($joins as $join) {
            $j = [
                'table' => $this->trimName($join['table']),
                'on' => $join['on'],
                'type' => $join['type'],
            ];
            if (!empty($alias)) {
                $j['alias'] = $this->trimName($join['alias']);
            }
            $this->joins = array_merge($this->joins, [$join]);
        }
        return $this;
    }
680124
public function join($join = [])
    {
        $this->string['join'] = $this->useBuilder('join')->join($join, $this->getBase()->getTable());
        return $this;
    }
682743
protected function visitSirelNodeJoin(Node\Join $join)
    {
        switch ($join->mode) {
            case Node\Join::INNER:
                $mode = "INNER";
                break;
            case Node\Join::LEFT:
                $mode = "LEFT";
                break;
            case Node\Join::LEFT_OUTER:
                $mode = "LEFT OUTER";
                break;
            case Node\Join::RIGHT:
                $mode = "RIGHT";
                break;
            case Node\Join::OUTER;
                $mode = "OUTER";
                break;
            default:
                $mode = '';
                break;
        }

        return ($join->natural ? 'NATURAL ' : '')
            . ($mode ? $mode . ' ' : '')
            . "JOIN "
            . $this->visit($join->left)
            . ($join->right ? ' ' . $this->visit($join->right) : '');
    }
290523
protected function addCollectionNode(DOMElement $element, $value): void
    {
        if ($element->childNodes->length === 0) {
            $this->convert($element, $value);
            return;
        }

        /**
         * @var $child DOMElement
         */
        $child = $this->element($element->nodeName);
        $element->parentNode->appendChild($child);
        $this->convert($child, $value);
    }