Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Zend_Service_ReCaptcha_MailHide Class Reference

Public Member Functions

 __construct ($publicKey=null, $privateKey=null, $email=null, $options=null)
 Local constructor.
 
 getEmailValidator ()
 Get emailValidator.
 
 setEmailValidator (Zend_Validate_Interface $validator)
 Set email validator.
 
 __toString ()
 Serialize as string.
 
 getDefaultOptions ()
 Get the default set of parameters.
 
 setPrivateKey ($privateKey)
 Override the setPrivateKey method.
 
 setEmail ($email)
 Set the email property.
 
 getEmail ()
 Get the email property.
 
 getEmailLocalPart ()
 Get the local part of the email address.
 
 getEmailDomainPart ()
 Get the domain part of the email address.
 
 getHtml ($email=null)
 Get the HTML code needed for the mail hide.
 
- Public Member Functions inherited from Zend_Service_ReCaptcha
 __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 ENCRYPTION_MODE = MCRYPT_MODE_CBC
 #@+ Encryption constants
 
const ENCRYPTION_CIPHER = MCRYPT_RIJNDAEL_128
 
const ENCRYPTION_BLOCK_SIZE = 16
 
const ENCRYPTION_IV = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
 
const MAILHIDE_SERVER = 'http://mailhide.recaptcha.net/d'
 
- Public Attributes inherited from Zend_Service_ReCaptcha
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

 _requireMcrypt ()
 See if the mcrypt extension is available.
 
 _getUrl ()
 Get the url used on the "hidden" part of the email address.
 
- Protected Member Functions inherited from Zend_Service_ReCaptcha
 _post ($challengeField, $responseField)
 Post a solution to the verify server.
 

Protected Attributes

 $_email = null
 
 $_emailValidator
 
 $_privateKeyPacked = null
 
 $_emailLocalPart = null
 
 $_emailDomainPart = null
 
- Protected Attributes inherited from Zend_Service_ReCaptcha
 $_publicKey = null
 
 $_privateKey = null
 
 $_ip = null
 
 $_params
 
 $_options
 
 $_response = null
 

Additional Inherited Members

- Static Public Member Functions inherited from Zend_Service_Abstract
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 Protected Attributes inherited from Zend_Service_Abstract
static $_httpClient = null
 

Constructor & Destructor Documentation

__construct (   $publicKey = null,
  $privateKey = null,
  $email = null,
  $options = null 
)

Local constructor.

Parameters
string$publicKey
string$privateKey
string$email
array | Zend_Config$options

Member Function Documentation

__toString ( )

Serialize as string.

When the instance is used as a string it will display the email address. Since we can't throw exceptions within this method we will trigger a user warning instead.

Returns
string
_getUrl ( )
protected

Get the url used on the "hidden" part of the email address.

Returns
string
_requireMcrypt ( )
protected

See if the mcrypt extension is available.

Exceptions
Zend_Service_ReCaptcha_MailHide_Exception
See Also
Zend_Service_ReCaptcha_MailHide_Exception
getDefaultOptions ( )

Get the default set of parameters.

Returns
array
getEmail ( )

Get the email property.

Returns
string
getEmailDomainPart ( )

Get the domain part of the email address.

Returns
string
getEmailLocalPart ( )

Get the local part of the email address.

Returns
string
getEmailValidator ( )

Get emailValidator.

Returns
Zend_Validate_Interface
getHtml (   $email = null)
setEmail (   $email)

Set the email property.

This method will set the email property along with the local and domain parts

Parameters
string$email
Returns
Zend_Service_ReCaptcha_MailHide
setEmailValidator ( Zend_Validate_Interface  $validator)

Set email validator.

Parameters
Zend_Validate_Interface$validator
Returns
Zend_Service_ReCaptcha_MailHide
setPrivateKey (   $privateKey)

Override the setPrivateKey method.

Override the parent method to store a binary representation of the private key as well.

Parameters
string$privateKey
Returns
Zend_Service_ReCaptcha_MailHide

Member Data Documentation

$_email = null
protected
$_emailDomainPart = null
protected
$_emailLocalPart = null
protected
$_emailValidator
protected
$_privateKeyPacked = null
protected
const ENCRYPTION_BLOCK_SIZE = 16
const ENCRYPTION_CIPHER = MCRYPT_RIJNDAEL_128
const ENCRYPTION_IV = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
const ENCRYPTION_MODE = MCRYPT_MODE_CBC

#@+ Encryption constants

const MAILHIDE_SERVER = 'http://mailhide.recaptcha.net/d'