/** * Creates a new IsMainLocation criterion * * @throws \InvalidArgumentException * * @param int $value one of self::MAIN and self::NOT_MAIN */ public function __construct($value) { if ($value !== self::MAIN && $value !== self::NOT_MAIN) { throw new InvalidArgumentException("Invalid main status value {$value}"); } parent::__construct(null, null, $value); }
/** * Creates a new LocationPriority criterion. * * @param string $operator One of the Operator constants * @param mixed $value The match value, either as an array of as a single value, depending on the operator */ public function __construct($operator, $value) { parent::__construct(null, $operator, $value); }