API Documentation

Service/ReCaptcha/MailHide.php

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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Service  
subpackage
ReCaptcha  

\Zend_Service_ReCaptcha_MailHide

Zend_Service_ReCaptcha_MailHide

Extends from
\Zend_Service_ReCaptcha
category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Service  
subpackage
ReCaptcha  
version
$Id: MailHide.php 23775 2011-03-01 17:25:24Z ralph $  

Constants

Constant  ENCRYPTION_MODE = 'MCRYPT_MODE_CBC'
Constant  ENCRYPTION_CIPHER = 'MCRYPT_RIJNDAEL_128'
Constant  ENCRYPTION_BLOCK_SIZE = '16'
Constant  ENCRYPTION_IV = '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
Constantstring  MAILHIDE_SERVER = 'http://mailhide.recaptcha.net/d'

Url to the mailhide server

string

Properties

Propertyprotectedstring  $_email= 'null'

The email address to protect

Default valuenullDetails
Type
string
Propertyprotectedstring  $_emailDomainPart= 'null'

The domain part of the email

Default valuenullDetails
Type
string
Propertyprotectedstring  $_emailLocalPart= 'null'

The local part of the email

Default valuenullDetails
Type
string
Propertyprotected\Zend_Validate_Interface  $_emailValidator= ''

Propertyprotectedstring  $_privateKeyPacked= 'null'

Binary representation of the private key

Default valuenullDetails
Type
string

Methods

methodpublic__construct( string $publicKey = null, string $privateKey = null, string $email = null, array|\Zend_Config $options = null ) : void

Local constructor

Parameters
Name Type Description
$publicKey string
$privateKey string
$email string
$options array|\Zend_Config
methodpublic__toString( ) : string

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
Type Description
string
methodprotected_getUrl( ) : string

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

Returns
Type Description
string
methodprotected_post( string $challengeField, string $responseField ) : \Zend_Http_Response

Post a solution to the verify server

Inherited from: \Zend_Service_ReCaptcha::_post()
Parameters
Name Type Description
$challengeField string
$responseField string
Returns
Type Description
\Zend_Http_Response
Throws
Exception Description
\Zend_Service_ReCaptcha_Exception
methodprotected_requireMcrypt( ) : void

See if the mcrypt extension is available

Throws
Exception Description
\Zend_Service_ReCaptcha_MailHide_Exception
methodpublicgetDefaultOptions( ) : array

Get the default set of parameters

Returns
Type Description
array
methodpublicgetEmail( ) : string

Get the email property

Returns
Type Description
string
methodpublicgetEmailDomainPart( ) : string

Get the domain part of the email address

Returns
Type Description
string
methodpublicgetEmailLocalPart( ) : string

Get the local part of the email address

Returns
Type Description
string
methodpublicgetEmailValidator( ) : \Zend_Validate_Interface

Get emailValidator

Returns
Type Description
\Zend_Validate_Interface
methodpublicgetHtml( string $email = null ) : string

Get the HTML code needed for the mail hide

This method uses the public key to fetch a recaptcha form.

Parameters
Name Type Description
$email string
Returns
Type Description
string
Throws
Exception Description
\Zend_Service_ReCaptcha_MailHide_Exception
methodpublicgetHttpClient( ) : \Zend_Http_Client
static

Gets the HTTP client object.

Inherited from: \Zend_Service_Abstract::getHttpClient()
Returns
Type Description
\Zend_Http_Client
methodpublicgetIp( ) : string

Get the ip property

Inherited from: \Zend_Service_ReCaptcha::getIp()
Returns
Type Description
string
methodpublicgetOption( string $key ) : mixed

Get a single option

Inherited from: \Zend_Service_ReCaptcha::getOption()
Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublicgetOptions( ) : array

Get the options array

Inherited from: \Zend_Service_ReCaptcha::getOptions()
Returns
Type Description
array
methodpublicgetParam( string $key ) : mixed

Get a single parameter

Inherited from: \Zend_Service_ReCaptcha::getParam()
Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublicgetParams( ) : array

Get the parameter array

Inherited from: \Zend_Service_ReCaptcha::getParams()
Returns
Type Description
array
methodpublicgetPrivateKey( ) : string

Get the private key

Inherited from: \Zend_Service_ReCaptcha::getPrivateKey()
Returns
Type Description
string
methodpublicgetPublicKey( ) : string

Get the public key

Inherited from: \Zend_Service_ReCaptcha::getPublicKey()
Returns
Type Description
string
methodpublicsetEmail( string $email ) : \Zend_Service_ReCaptcha_MailHide

Set the email property

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

Parameters
Name Type Description
$email string
Returns
Type Description
\Zend_Service_ReCaptcha_MailHide
methodpublicsetEmailValidator( \Zend_Validate_Interface $validator ) : \Zend_Service_ReCaptcha_MailHide

Set email validator

Parameters
Name Type Description
$validator \Zend_Validate_Interface
Returns
Type Description
\Zend_Service_ReCaptcha_MailHide
methodpublicsetHttpClient( \Zend_Http_Client $httpClient ) : void
static

Sets the HTTP client object to use for retrieving the feeds. If none is set, the default Zend_Http_Client will be used.

Inherited from: \Zend_Service_Abstract::setHttpClient()
Parameters
Name Type Description
$httpClient \Zend_Http_Client
methodpublicsetIp( string $ip ) : \Zend_Service_ReCaptcha

Set the ip property

Inherited from: \Zend_Service_ReCaptcha::setIp()
Parameters
Name Type Description
$ip string
Returns
Type Description
\Zend_Service_ReCaptcha
methodpublicsetOption( string $key, string $value ) : \Zend_Service_ReCaptcha

Set a single option

Inherited from: \Zend_Service_ReCaptcha::setOption()
Parameters
Name Type Description
$key string
$value string
Returns
Type Description
\Zend_Service_ReCaptcha
methodpublicsetOptions( array|\Zend_Config $options ) : \Zend_Service_ReCaptcha

Set options

Inherited from: \Zend_Service_ReCaptcha::setOptions()
Parameters
Name Type Description
$options array|\Zend_Config
Returns
Type Description
\Zend_Service_ReCaptcha
Throws
Exception Description
\Zend_Service_ReCaptcha_Exception
methodpublicsetParam( string $key, string $value ) : \Zend_Service_ReCaptcha

Set a single parameter

Inherited from: \Zend_Service_ReCaptcha::setParam()
Parameters
Name Type Description
$key string
$value string
Returns
Type Description
\Zend_Service_ReCaptcha
methodpublicsetParams( array|\Zend_Config $params ) : \Zend_Service_ReCaptcha

Set parameters

Inherited from: \Zend_Service_ReCaptcha::setParams()
Parameters
Name Type Description
$params array|\Zend_Config
Returns
Type Description
\Zend_Service_ReCaptcha
Throws
Exception Description
\Zend_Service_ReCaptcha_Exception
methodpublicsetPrivateKey( string $privateKey ) : \Zend_Service_ReCaptcha_MailHide

Override the setPrivateKey method

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

Parameters
Name Type Description
$privateKey string
Returns
Type Description
\Zend_Service_ReCaptcha_MailHide
methodpublicsetPublicKey( string $publicKey ) : \Zend_Service_ReCaptcha

Set the public key

Inherited from: \Zend_Service_ReCaptcha::setPublicKey()
Parameters
Name Type Description
$publicKey string
Returns
Type Description
\Zend_Service_ReCaptcha
methodpublicverify( string $challengeField, string $responseField ) : \Zend_Service_ReCaptcha_Response

Verify the user input

Inherited from: \Zend_Service_ReCaptcha::verify()

This method calls up the post method and returns a Zend_Service_ReCaptcha_Response object.

Parameters
Name Type Description
$challengeField string
$responseField string
Returns
Type Description
\Zend_Service_ReCaptcha_Response
Documentation was generated by DocBlox 0.13.3.