1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (http://nette.org)
5: *
6: * Copyright (c) 2004, 2011 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: */
20: final class NRule extends NObject
21: {
22: /** type */
23: const CONDITION = 1;
24:
25: /** type */
26: const VALIDATOR = 2;
27:
28: /** type */
29: const FILTER = 3;
30:
31: /** @var IFormControl */
32: public $control;
33:
34: /** @var mixed */
35: public $operation;
36:
37: /** @var mixed */
38: public $arg;
39:
40: /** @var int (CONDITION, VALIDATOR, FILTER) */
41: public $type;
42:
43: /** @var bool */
44: public $isNegative = FALSE;
45:
46: /** @var string (only for VALIDATOR type) */
47: public $message;
48:
49: /** @var NRules (only for CONDITION type) */
50: public $subRules;
51:
52: }
53: