1 | <?php |
||
14 | class Rule |
||
15 | { |
||
16 | /** @var string */ |
||
17 | private $rule; |
||
18 | |||
19 | /** @var Parser */ |
||
20 | private $parser; |
||
21 | |||
22 | /** @var string */ |
||
23 | private $parsedRule = ''; |
||
24 | |||
25 | /** @var string */ |
||
26 | private $error = ''; |
||
27 | |||
28 | private $container; |
||
29 | |||
30 | 60 | public function __construct(string $rule, array $variables = []) |
|
36 | |||
37 | 4 | public function isTrue(): bool |
|
44 | |||
45 | 2 | public function isFalse(): bool |
|
49 | |||
50 | /** |
||
51 | * Tells whether a rule is valid (as in "can be parsed without error") or not. |
||
52 | */ |
||
53 | 58 | public function isValid(): bool |
|
64 | |||
65 | 58 | public function getError(): string |
|
69 | } |
||
70 |