/** * SimpleOperatorCondition constructor. * @param $field * @param $value * @param $operator */ private function __construct($field, $value, $operator) { ConditionsUtil::assertFieldName($field); $this->field = $field; $this->value = $value; $this->operator = $operator; }
/** * PhraseCondition constructor. */ private function __construct($field, $phrase, $mode) { ConditionsUtil::assertFieldName($field); $this->field = $field; $this->phrase = $phrase; $this->mode = $mode; }
private function __construct($field, $from, $to, $negation) { ConditionsUtil::assertFieldName($field); $this->field = $field; $this->from = $from; $this->to = $to; $this->isNegation = $negation; }
public function __construct($field, $direction = 'asc') { ConditionsUtil::assertFieldName($field); $this->field = $field; $direction = strtolower($direction); if ($direction !== self::DESC) { $direction = self::ASC; } $this->direction = $direction; }
private function __construct($field, $negation) { ConditionsUtil::assertFieldName($field); $this->field = $field; $this->negation = !!$negation; }