Zend_Service_ReCaptcha_Response

category Zend
package Zend_Service
subpackage ReCaptcha
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
version $Id$

 Methods

Class constructor used to construct a response

__construct(string $status = null, string $errorCode = null, \Zend_Http_Response $httpResponse = null

Parameters

$status

string

$errorCode

string

$httpResponse

\Zend_Http_Response

If this is set the content will override $status and $errorCode

Get the error code

getErrorCode() : string

Returns

string

Get the status

getStatus() : boolean

Returns

boolean

Alias for getStatus()

isValid() : boolean

Returns

boolean

Set the error code

setErrorCode(string $errorCode) : \Zend_Service_ReCaptcha_Response

Parameters

$errorCode

string

Returns

\Zend_Service_ReCaptcha_Response

Populate this instance based on a Zend_Http_Response object

setFromHttpResponse(\Zend_Http_Response $response) : \Zend_Service_ReCaptcha_Response

Parameters

$response

\Zend_Http_Response

Returns

\Zend_Service_ReCaptcha_Response

Set the status

setStatus(string $status) : \Zend_Service_ReCaptcha_Response

Parameters

$status

string

Returns

\Zend_Service_ReCaptcha_Response

 Properties

 

Error code

$_errorCode : string

Default

null

The error code if the status is false. The different error codes can be found in the recaptcha API docs.

 

Status

$_status : boolean

Default

null

true if the response is valid or false otherwise