queryBuilder = new QueryBuilder(); $this->queryBuilder->parent = $queryBuilder; } public function set(string $side, /* QueryBuilder|string */ $table, string $field, /* QueryBuilder|string */ $value) { $this->side = $side; $this->table = $table; $this->field = $field; $this->value = $value; } public function render() : string { if ($this->queryBuilder->where ?? false ) { $where = $this->renderSegments([Where::CONDITION_AND, $this->queryBuilder->render(true)]); } return $this->renderSegments([ strtoupper($this->side), $this->outer ? static::SQL_OUTER : "", static::SQL_TOKEN, $this->table, $this->alias ?? "", $this->attachment, $this->field, "=", $this->value, $where ?? "" ]); } }