Zend Framework
1.12
|
Public Member Functions | |
__construct ($publicKey=null, $privateKey=null, $params=null, $options=null, $ip=null) | |
Class constructor. | |
__toString () | |
Serialize as string. | |
setIp ($ip) | |
Set the ip property. | |
getIp () | |
Get the ip property. | |
setParam ($key, $value) | |
Set a single parameter. | |
setParams ($params) | |
Set parameters. | |
getParams () | |
Get the parameter array. | |
getParam ($key) | |
Get a single parameter. | |
setOption ($key, $value) | |
Set a single option. | |
setOptions ($options) | |
Set options. | |
getOptions () | |
Get the options array. | |
getOption ($key) | |
Get a single option. | |
getPublicKey () | |
Get the public key. | |
setPublicKey ($publicKey) | |
Set the public key. | |
getPrivateKey () | |
Get the private key. | |
setPrivateKey ($privateKey) | |
Set the private key. | |
getHtml ($name=null) | |
Get the HTML code for the captcha. | |
verify ($challengeField, $responseField) | |
Verify the user input. | |
Public Attributes | |
const | API_SERVER = 'http://www.google.com/recaptcha/api' |
const | API_SECURE_SERVER = 'https://www.google.com/recaptcha/api' |
const | VERIFY_SERVER = 'http://www.google.com/recaptcha/api/verify' |
Protected Member Functions | |
_post ($challengeField, $responseField) | |
Post a solution to the verify server. | |
Protected Attributes | |
$_publicKey = null | |
$_privateKey = null | |
$_ip = null | |
$_params | |
$_options | |
$_response = null | |
Additional Inherited Members | |
![]() | |
static | setHttpClient (Zend_Http_Client $httpClient) |
Sets the HTTP client object to use for retrieving the feeds. | |
static | getHttpClient () |
Gets the HTTP client object. | |
![]() | |
static | $_httpClient = null |
__construct | ( | $publicKey = null , |
|
$privateKey = null , |
|||
$params = null , |
|||
$options = null , |
|||
$ip = null |
|||
) |
Class constructor.
string | $publicKey | |
string | $privateKey | |
array | $params | |
array | $options | |
string | $ip | |
array | Zend_Config | $params |
__toString | ( | ) |
Serialize as string.
When the instance is used as a string it will display the recaptcha. Since we can't throw exceptions within this method we will trigger a user warning instead.
|
protected |
Post a solution to the verify server.
string | $challengeField | |
string | $responseField |
Zend_Service_ReCaptcha_Exception |
getHtml | ( | $name = null | ) |
Get the HTML code for the captcha.
This method uses the public key to fetch a recaptcha form.
null | string | $name | Base name for recaptcha form elements |
Zend_Service_ReCaptcha_Exception |
getIp | ( | ) |
Get the ip property.
getOption | ( | $key | ) |
Get a single option.
string | $key |
getOptions | ( | ) |
Get the options array.
getParam | ( | $key | ) |
Get a single parameter.
string | $key |
getParams | ( | ) |
Get the parameter array.
getPrivateKey | ( | ) |
Get the private key.
getPublicKey | ( | ) |
Get the public key.
setIp | ( | $ip | ) |
setOption | ( | $key, | |
$value | |||
) |
setOptions | ( | $options | ) |
Set options.
array | Zend_Config | $options |
Zend_Service_ReCaptcha_Exception |
setParam | ( | $key, | |
$value | |||
) |
setParams | ( | $params | ) |
Set parameters.
array | Zend_Config | $params |
Zend_Service_ReCaptcha_Exception |
setPrivateKey | ( | $privateKey | ) |
setPublicKey | ( | $publicKey | ) |
verify | ( | $challengeField, | |
$responseField | |||
) |
Verify the user input.
This method calls up the post method and returns a Zend_Service_ReCaptcha_Response object.
string | $challengeField | |
string | $responseField |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const API_SECURE_SERVER = 'https://www.google.com/recaptcha/api' |
const API_SERVER = 'http://www.google.com/recaptcha/api' |
const VERIFY_SERVER = 'http://www.google.com/recaptcha/api/verify' |