API Documentation

Zend/Service/ReCaptcha/Response.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Service  
Subpackage
ReCaptcha  

\Zend_Service_ReCaptcha_Response

Package: Zend\Service\ReCaptcha

Zend_Service_ReCaptcha_Response

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id: Response.php 24594 2012-01-05 21:27:01Z matthew $  

Properties

Propertyprotectedstring  $_errorCode= 'null'

Error code

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

Default valuenullDetails
Type
string
Propertyprotectedboolean  $_status= 'null'

Status

true if the response is valid or false otherwise

Default valuenullDetails
Type
boolean

Methods

methodpublic__construct( string $status = null, string $errorCode = null, \Zend_Http_Response $httpResponse = null ) : void

Class constructor used to construct a response

Parameters
Name Type Description
$status string
$errorCode string
$httpResponse \Zend_Http_Response

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

methodpublicgetErrorCode( ) : string

Get the error code

Returns
Type Description
string
methodpublicgetStatus( ) : boolean

Get the status

Returns
Type Description
boolean
methodpublicisValid( ) : boolean

Alias for getStatus()

Returns
Type Description
boolean
methodpublicsetErrorCode( string $errorCode ) : \Zend_Service_ReCaptcha_Response

Set the error code

Parameters
Name Type Description
$errorCode string
Returns
Type Description
\Zend_Service_ReCaptcha_Response
methodpublicsetFromHttpResponse( \Zend_Http_Response $response ) : \Zend_Service_ReCaptcha_Response

Populate this instance based on a Zend_Http_Response object

Parameters
Name Type Description
$response \Zend_Http_Response
Returns
Type Description
\Zend_Service_ReCaptcha_Response
methodpublicsetStatus( string $status ) : \Zend_Service_ReCaptcha_Response

Set the status

Parameters
Name Type Description
$status string
Returns
Type Description
\Zend_Service_ReCaptcha_Response
Documentation was generated by DocBlox 0.15.1.