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