| 1 | <?php |
||
| 39 | trait Validator |
||
| 40 | { |
||
| 41 | /** |
||
| 42 | * @var ValidatorForm instance |
||
| 43 | */ |
||
| 44 | private $validatorForm; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Get ValidatorBuilder |
||
| 48 | * |
||
| 49 | * @return ValidatorForm |
||
| 50 | */ |
||
| 51 | 2 | private function getValidatorForm() : ValidatorForm |
|
| 58 | |||
| 59 | /** |
||
| 60 | * Add ValidatorChain |
||
| 61 | * |
||
| 62 | * @param string $name |
||
| 63 | * |
||
| 64 | * @return ValidatorChain |
||
| 65 | */ |
||
| 66 | 2 | public function addValidator($name) : ValidatorChain |
|
| 70 | |||
| 71 | /** |
||
| 72 | * Get ValidatorChain |
||
| 73 | * |
||
| 74 | * @param string $name |
||
| 75 | * |
||
| 76 | * @return ValidatorChain |
||
| 77 | */ |
||
| 78 | public function getValidator($name) : ValidatorChain |
||
| 82 | |||
| 83 | /** |
||
| 84 | * Validate input data |
||
| 85 | * |
||
| 86 | * @param array $input |
||
| 87 | * |
||
| 88 | * @return bool |
||
| 89 | */ |
||
| 90 | public function validate($input) : bool |
||
| 94 | |||
| 95 | /** |
||
| 96 | * Assert input data |
||
| 97 | * |
||
| 98 | * @param array $input |
||
| 99 | * |
||
| 100 | * @throws \Bluz\Validator\Exception\ValidatorException |
||
| 101 | */ |
||
| 102 | 2 | public function assert($input) : void |
|
| 106 | } |
||
| 107 |