op = $op; $this->a = $a; $this->b = $b; } private const FTSOPS = [ LogicOp::OP_AND => "", LogicOp::OP_OR => "OR", ]; protected function fts4Query(): string { $ftsop = self::FTSOPS[$this->op]; assert($ftsop); return "({$this->a->fts4Query()} {$ftsop} {$this->b->fts4Query()})"; } public function toString(): string { return "({$this->a->toString()} FTS-{$this->op} {$this->b->toString()})"; } }