You are here

public function ReCaptcha::setExpectedAction in reCAPTCHA 8.2

Same name and namespace in other branches
  1. 7.2 recaptcha-php/src/ReCaptcha/ReCaptcha.php \ReCaptcha\ReCaptcha::setExpectedAction()

Provide an action to match against in verify() This should be set per page.

Parameters

string $action Expected action:

Return value

ReCaptcha Current instance for fluent interface

File

recaptcha-php/src/ReCaptcha/ReCaptcha.php, line 231

Class

ReCaptcha
reCAPTCHA client.

Namespace

ReCaptcha

Code

public function setExpectedAction($action) {
  $this->action = $action;
  return $this;
}