/**
  * @param string      $field
  * @param string      $order
  * @param string|null $dqlAlias
  *
  * @throws InvalidArgumentException
  */
 public function __construct($field, $order = null, $dqlAlias = null)
 {
     $order = !$order ? self::ASC : strtoupper($order);
     if (!in_array($order, self::$validOrder, true)) {
         throw new InvalidArgumentException();
     }
     $this->order = $order;
     parent::__construct($field, $dqlAlias);
 }
 /**
  * @param string      $operator
  * @param string      $field
  * @param string      $value
  * @param string|null $dqlAlias
  *
  * @throws InvalidArgumentException
  */
 public function __construct($operator, $field, $value, $dqlAlias = null)
 {
     if (!in_array($operator, self::$operators, true)) {
         throw new InvalidArgumentException(sprintf('"%s" is not a valid operator. Valid operators: %s', $operator, implode(', ', self::$operators)));
     }
     $this->operator = $operator;
     $this->value = $value;
     parent::__construct($field, $dqlAlias);
 }
 /**
  * @param string      $field
  * @param string      $newAlias
  * @param string|null $dqlAlias
  *
  * @throws InvalidArgumentException
  */
 public function __construct($field, $newAlias, $dqlAlias = null)
 {
     $this->newAlias = $newAlias;
     parent::__construct($field, $dqlAlias);
 }
Esempio n. 4
0
 /**
  * @param string      $field
  * @param mixed       $value
  * @param string|null $dqlAlias
  */
 public function __construct($field, $value, $dqlAlias = null)
 {
     $this->value = $value;
     parent::__construct($field, $dqlAlias);
 }
 /**
  * @param string $field
  * @param string $className
  * @param string $dqlAlias
  */
 public function __construct($field, $className, $dqlAlias = null)
 {
     $this->className = $className;
     parent::__construct($field, $dqlAlias);
 }
 /**
  * @param string      $field
  * @param mixed       $from
  * @param mixed       $to
  * @param string|null $dqlAlias
  */
 public function __construct($field, $from, $to, $dqlAlias = null)
 {
     $this->from = $from;
     $this->to = $to;
     parent::__construct($field, $dqlAlias);
 }
 /**
  * Constructor.
  *
  * @param string      $field
  * @param string      $type
  * @param string|null $dqlAlias
  */
 public function __construct($field, $type = self::ADD_GROUP_BY, $dqlAlias = null)
 {
     $this->setType($type);
     parent::__construct($field, $dqlAlias);
 }