/**
  * 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;
 }
示例#2
0
 /**
  * PhraseCondition constructor.
  */
 private function __construct($field, $phrase, $mode)
 {
     ConditionsUtil::assertFieldName($field);
     $this->field = $field;
     $this->phrase = $phrase;
     $this->mode = $mode;
 }
示例#3
0
 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;
 }
示例#5
0
 private function __construct($field, $negation)
 {
     ConditionsUtil::assertFieldName($field);
     $this->field = $field;
     $this->negation = !!$negation;
 }