public function RequestParameters::toArray in reCAPTCHA 7.2
Same name and namespace in other branches
- 8.2 recaptcha-php/src/ReCaptcha/RequestParameters.php \ReCaptcha\RequestParameters::toArray()
- 6.2 recaptcha-php/src/ReCaptcha/RequestParameters.php \ReCaptcha\RequestParameters::toArray()
Array representation.
Return value
array Array formatted parameters.
1 call to RequestParameters::toArray()
- RequestParameters::toQueryString in recaptcha-php/
src/ ReCaptcha/ RequestParameters.php - Query string representation for HTTP request.
File
- recaptcha-php/
src/ ReCaptcha/ RequestParameters.php, line 79
Class
- RequestParameters
- Stores and formats the parameters for the request to the reCAPTCHA service.
Namespace
ReCaptchaCode
public function toArray() {
$params = array(
'secret' => $this->secret,
'response' => $this->response,
);
if (!is_null($this->remoteIp)) {
$params['remoteip'] = $this->remoteIp;
}
if (!is_null($this->version)) {
$params['version'] = $this->version;
}
return $params;
}