expression = $expression; $this->fieldList = $fieldList; $this->columnList = $columnList; $this->mode = $mode; if (!in_array($mode, [Mode::NATURAL_LANGUAGE, Mode::BOOLEAN])) { throw new InvalidArgumentException("Bad mode."); } } public function getExpression(): Expression { return $this->expression; } /** * @return string[] */ public function getFieldList(): array { return $this->fieldList; } /** * @return string[] */ public function getColumnList(): array { return $this->columnList; } /** * @return Mode::* */ public function getMode(): string { return $this->mode; } }