|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct ($publicKey=null, $privateKey=null, $params=null, $options=null, $ip=null) | |
| __toString () | |
| setIp ($ip) | |
| getIp () | |
| setParam ($key, $value) | |
| setParams ($params) | |
| getParams () | |
| getParam ($key) | |
| setOption ($key, $value) | |
| setOptions ($options) | |
| getOptions () | |
| getOption ($key) | |
| getPublicKey () | |
| setPublicKey ($publicKey) | |
| getPrivateKey () | |
| setPrivateKey ($privateKey) | |
| getHtml () | |
| verify ($challengeField, $responseField) | |
Data Fields | |
| const | API_SERVER = 'http://api.recaptcha.net' |
| const | API_SECURE_SERVER = 'https://api-secure.recaptcha.net' |
| const | VERIFY_SERVER = 'http://api-verify.recaptcha.net/verify' |
Protected Member Functions | |
| _post ($challengeField, $responseField) | |
Protected Attributes | |
| $_publicKey = null | |
| $_privateKey = null | |
| $_ip = null | |
| $_params | |
| $_options | |
| $_response = null | |
Definition at line 41 of file ReCaptcha.php.
| __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 |
Definition at line 127 of file ReCaptcha.php.

| __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.
Reimplemented in Zend_Service_ReCaptcha_MailHide.
Definition at line 162 of file ReCaptcha.php.

| _post | ( | $ | challengeField, |
| $ | responseField | ||
| ) | [protected] |
Post a solution to the verify server
| string | $challengeField | |
| string | $responseField |
| Zend_Service_ReCaptcha_Exception |
Definition at line 447 of file ReCaptcha.php.


| getHtml | ( | ) |
Get the HTML code for the captcha
This method uses the public key to fetch a recaptcha form.
| Zend_Service_ReCaptcha_Exception |
Definition at line 379 of file ReCaptcha.php.

| getIp | ( | ) |
| getOption | ( | $ | key | ) |
Get a single option
| string | $key |
Definition at line 320 of file ReCaptcha.php.

| getOptions | ( | ) |
| getParam | ( | $ | key | ) |
Get a single parameter
| string | $key |
Definition at line 256 of file ReCaptcha.php.
| getParams | ( | ) |
| getPrivateKey | ( | ) |
| getPublicKey | ( | ) |
| setIp | ( | $ | ip | ) |
Set the ip property
| string | $ip |
Definition at line 180 of file ReCaptcha.php.

| setOption | ( | $ | key, |
| $ | value | ||
| ) |
Set a single option
| string | $key | |
| string | $value |
Definition at line 268 of file ReCaptcha.php.

| setOptions | ( | $ | options | ) |
Set options
| array | Zend_Config | $options |
| Zend_Service_ReCaptcha_Exception |
Definition at line 282 of file ReCaptcha.php.


| setParam | ( | $ | key, |
| $ | value | ||
| ) |
Set a single parameter
| string | $key | |
| string | $value |
Definition at line 204 of file ReCaptcha.php.

| setParams | ( | $ | params | ) |
Set parameters
| array | Zend_Config | $params |
| Zend_Service_ReCaptcha_Exception |
Definition at line 218 of file ReCaptcha.php.


| setPrivateKey | ( | $ | privateKey | ) |
Set the private key
| string | $privateKey |
Reimplemented in Zend_Service_ReCaptcha_MailHide.
Definition at line 364 of file ReCaptcha.php.

| setPublicKey | ( | $ | publicKey | ) |
Set the public key
| string | $publicKey |
Definition at line 341 of file ReCaptcha.php.

| 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 |
Definition at line 500 of file ReCaptcha.php.

$_ip = null [protected] |
Definition at line 83 of file ReCaptcha.php.
$_options [protected] |
array( 'theme' => 'red', 'lang' => 'en', )
Definition at line 105 of file ReCaptcha.php.
$_params [protected] |
array( 'ssl' => false, 'error' => null, 'xhtml' => false )
Definition at line 90 of file ReCaptcha.php.
$_privateKey = null [protected] |
Definition at line 76 of file ReCaptcha.php.
$_publicKey = null [protected] |
Definition at line 69 of file ReCaptcha.php.
$_response = null [protected] |
Definition at line 115 of file ReCaptcha.php.
| const API_SECURE_SERVER = 'https://api-secure.recaptcha.net' |
Definition at line 55 of file ReCaptcha.php.
| const API_SERVER = 'http://api.recaptcha.net' |
Definition at line 48 of file ReCaptcha.php.
| const VERIFY_SERVER = 'http://api-verify.recaptcha.net/verify' |
Definition at line 62 of file ReCaptcha.php.