You are here

public function Response::toArray in reCAPTCHA 8.2

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

File

recaptcha-php/src/ReCaptcha/Response.php, line 198

Class

Response
The response returned from the service.

Namespace

ReCaptcha

Code

public function toArray() {
  return array(
    'success' => $this
      ->isSuccess(),
    'hostname' => $this
      ->getHostname(),
    'challenge_ts' => $this
      ->getChallengeTs(),
    'apk_package_name' => $this
      ->getApkPackageName(),
    'score' => $this
      ->getScore(),
    'action' => $this
      ->getAction(),
    'error-codes' => $this
      ->getErrorCodes(),
  );
}