| 1 | <?php |
||
| 10 | class GoogleRecaptchaCallable implements LoggerAwareInterface |
||
| 11 | { |
||
| 12 | use LoggerAwareTrait; |
||
| 13 | |||
| 14 | |||
| 15 | /** |
||
| 16 | * @var ReCaptcha |
||
| 17 | */ |
||
| 18 | public $recaptcha; |
||
| 19 | |||
| 20 | |||
| 21 | /** |
||
| 22 | * @param ReCaptcha $recaptcha |
||
| 23 | * @param LoggerInterface|null $logger |
||
| 24 | */ |
||
| 25 | public function __construct( ReCaptcha $recaptcha, LoggerInterface $logger = null ) |
||
| 30 | |||
| 31 | |||
| 32 | /** |
||
| 33 | * @param string $g_recaptcha_response |
||
| 34 | * @param string $remote_ip |
||
| 35 | * @return bool |
||
| 36 | * |
||
| 37 | * See also: https://developers.google.com/recaptcha/docs/verify |
||
| 38 | */ |
||
| 39 | public function __invoke( $g_recaptcha_response, $remote_ip) |
||
| 60 | } |
||
| 61 |