1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (https://nette.org)
5: * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
6: * @package Nette\Forms
7: */
8:
9:
10:
11: /**
12: * Single validation rule or condition represented as value object.
13: *
14: * @author David Grudl
15: * @package Nette\Forms
16: */
17: class NRule extends NObject
18: {
19: /** type */
20: const CONDITION = 1;
21:
22: /** type */
23: const VALIDATOR = 2;
24:
25: /** type */
26: const FILTER = 3;
27:
28: /** @var IFormControl */
29: public $control;
30:
31: /** @var mixed */
32: public $operation;
33:
34: /** @var mixed */
35: public $arg;
36:
37: /** @var int (CONDITION, VALIDATOR, FILTER) */
38: public $type;
39:
40: /** @var bool */
41: public $isNegative = FALSE;
42:
43: /** @var string (only for VALIDATOR type) */
44: public $message;
45:
46: /** @var NRules (only for CONDITION type) */
47: public $subRules;
48:
49: }
50: