Exemplo n.º 1
0
 /**
  * Constructor.
  *
  * Available options:
  *
  *  * left_field:         The left field name
  *  * operator:           The comparison operator
  *                          * self::EQUAL
  *                          * self::NOT_EQUAL
  *                          * self::IDENTICAL
  *                          * self::NOT_IDENTICAL
  *                          * self::LESS_THAN
  *                          * self::LESS_THAN_EQUAL
  *                          * self::GREATER_THAN
  *                          * self::GREATER_THAN_EQUAL
  *  * right_field:        The right field name
  *  * throw_global_error: Whether to throw a global error (false by default) or an error tied to the left field
  *
  * @param string $leftField   The left field name
  * @param string $operator    The operator to apply
  * @param string $rightField  The right field name
  * @param array  $options     An array of options
  * @param array  $messages    An array of error messages
  *
  * @see Base
  */
 public function __construct($leftField, $operator, $rightField, $options = array(), $messages = array())
 {
     $this->addOption('left_field', $leftField);
     $this->addOption('operator', $operator);
     $this->addOption('right_field', $rightField);
     $this->addOption('throw_global_error', false);
     parent::__construct(null, $options, $messages);
 }