| 1 | <?php |
||
| 10 | class RecaptchaValidator extends AbstractValidator |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var ReCaptcha |
||
| 14 | */ |
||
| 15 | 7 | protected $recaptcha; |
|
| 16 | |||
| 17 | 7 | public function __construct(ReCaptcha $recaptcha) |
|
| 22 | |||
| 23 | /** |
||
| 24 | * Returns true if and only if $value meets the validation requirements |
||
| 25 | * |
||
| 26 | * If $value fails validation, then this method returns false, and |
||
| 27 | * getMessages() will return an array of messages that explain why the |
||
| 28 | * validation failed. |
||
| 29 | * |
||
| 30 | * @param mixed $value |
||
| 31 | * @return bool |
||
| 32 | 3 | * @throws Exception\RuntimeException If validation of $value is impossible |
|
| 33 | */ |
||
| 34 | 3 | public function isValid($value): bool |
|
| 39 | } |
||
| 40 |