Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * Pop PHP Framework (http://www.popphp.org/) |
4 | * |
5 | * @link https://github.com/popphp/popphp-framework |
6 | * @author Nick Sagona, III <dev@nolainteractive.com> |
7 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
8 | * @license http://www.popphp.org/license New BSD License |
9 | */ |
10 | |
11 | /** |
12 | * @namespace |
13 | */ |
14 | namespace Pop\Validator; |
15 | |
16 | /** |
17 | * Validator interface |
18 | * |
19 | * @category Pop |
20 | * @package Pop\Validator |
21 | * @author Nick Sagona, III <dev@nolainteractive.com> |
22 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
23 | * @license http://www.popphp.org/license New BSD License |
24 | * @version 4.0.0 |
25 | */ |
26 | interface ValidatorInterface |
27 | { |
28 | |
29 | /** |
30 | * Get the validator value |
31 | * |
32 | * @return mixed |
33 | */ |
34 | public function getValue(): mixed; |
35 | |
36 | /** |
37 | * Get the validator default message |
38 | * |
39 | * @return string|null |
40 | */ |
41 | public function getMessage(): string|null; |
42 | |
43 | /** |
44 | * Get the validator input |
45 | * |
46 | * @return mixed |
47 | */ |
48 | public function getInput(): mixed; |
49 | |
50 | /** |
51 | * Get the validator results |
52 | * |
53 | * @return mixed |
54 | */ |
55 | public function getResults(): mixed; |
56 | |
57 | /** |
58 | * Has validator results |
59 | * |
60 | * @return bool |
61 | */ |
62 | public function hasResults(): bool; |
63 | |
64 | /** |
65 | * Set the validator value |
66 | * |
67 | * @param mixed $value |
68 | * @return ValidatorInterface |
69 | */ |
70 | public function setValue(mixed $value): ValidatorInterface; |
71 | |
72 | /** |
73 | * Set the validator default message |
74 | * |
75 | * @param ?string $message |
76 | * @return ValidatorInterface |
77 | */ |
78 | public function setMessage(?string $message = null): ValidatorInterface; |
79 | |
80 | /** |
81 | * Set the validator input |
82 | * |
83 | * @param mixed $input |
84 | * @return ValidatorInterface |
85 | */ |
86 | public function setInput(mixed $input = null): ValidatorInterface; |
87 | |
88 | /** |
89 | * Evaluate |
90 | * |
91 | * @param mixed $input |
92 | * @return bool |
93 | */ |
94 | public function evaluate(mixed $input = null): bool; |
95 | |
96 | } |