/**
  * 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;
 }
예제 #4
0
 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;
 }