API Documentation

Zend/Service/ReCaptcha/MailHide.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_MailHide

Package: Zend\Service\ReCaptcha

Zend_Service_ReCaptcha_MailHide

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

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_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

Parameters
Name Type Description
$email string
Returns
Type Description
string
Throws
Exception Description
\Zend_Service_ReCaptcha_MailHide_Exception
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
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
Documentation was generated by DocBlox 0.15.1.