| 1 | <?php |
||
| 19 | class ReCaptchaComponent extends Component |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var string the ReCAPTCHA sitekey |
||
| 23 | */ |
||
| 24 | public $key; |
||
| 25 | /** |
||
| 26 | * @var string the shared key between the site and ReCAPTCHA |
||
| 27 | */ |
||
| 28 | public $secret; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @inheritdoc |
||
| 32 | * |
||
| 33 | * @throws InvalidConfigException |
||
| 34 | */ |
||
| 35 | public function init() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Verifies whether a user response is valid or not. |
||
| 50 | * |
||
| 51 | * @param $value |
||
| 52 | * |
||
| 53 | * @return bool |
||
| 54 | */ |
||
| 55 | public function verify($value) |
||
| 77 | } |
||
| 78 |