Response
in package
The response returned from the service.
Table of Contents
Properties
- $action : string
- Action as specified by the page
- $apkPackageName : string
- APK package name
- $challengeTs : string
- Timestamp of the challenge load (ISO format yyyy-MM-dd'T'HH:mm:ssZZ)
- $errorCodes : array<string|int, mixed>
- Error code strings.
- $hostname : string
- The hostname of the site where the reCAPTCHA was solved.
- $score : float
- Score assigned to the request
- $success : bool
- Success or failure.
Methods
- __construct() : mixed
- Constructor.
- fromJson() : Response
- Build the response from the expected JSON returned by the service.
- getAction() : string
- Get action
- getApkPackageName() : string
- Get APK package name
- getChallengeTs() : string
- Get challenge timestamp
- getErrorCodes() : array<string|int, mixed>
- Get error codes.
- getHostname() : string
- Get hostname.
- getScore() : float
- Get score
- isSuccess() : bool
- Is success?
- toArray() : mixed
Properties
$action
Action as specified by the page
private
string
$action
$apkPackageName
APK package name
private
string
$apkPackageName
$challengeTs
Timestamp of the challenge load (ISO format yyyy-MM-dd'T'HH:mm:ssZZ)
private
string
$challengeTs
$errorCodes
Error code strings.
private
array<string|int, mixed>
$errorCodes
= array()
$hostname
The hostname of the site where the reCAPTCHA was solved.
private
string
$hostname
$score
Score assigned to the request
private
float
$score
$success
Success or failure.
private
bool
$success
= false
Methods
__construct()
Constructor.
public
__construct(bool $success[, array<string|int, mixed> $errorCodes = array() ][, string $hostname = null ][, string $challengeTs = null ][, string $apkPackageName = null ][, float $score = null ][, string $action = null ]) : mixed
Parameters
- $success : bool
- $errorCodes : array<string|int, mixed> = array()
- $hostname : string = null
- $challengeTs : string = null
- $apkPackageName : string = null
- $score : float = null
- $action : string = null
fromJson()
Build the response from the expected JSON returned by the service.
public
static fromJson(string $json) : Response
Parameters
- $json : string
Return values
ResponsegetAction()
Get action
public
getAction() : string
Return values
stringgetApkPackageName()
Get APK package name
public
getApkPackageName() : string
Return values
stringgetChallengeTs()
Get challenge timestamp
public
getChallengeTs() : string
Return values
stringgetErrorCodes()
Get error codes.
public
getErrorCodes() : array<string|int, mixed>
Return values
array<string|int, mixed>getHostname()
Get hostname.
public
getHostname() : string
Return values
stringgetScore()
Get score
public
getScore() : float
Return values
floatisSuccess()
Is success?
public
isSuccess() : bool
Return values
booltoArray()
public
toArray() : mixed