Service/ReCaptcha/MailHide.php

Show: PublicProtectedPrivateinherited
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-2014 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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id$  

Constants

>VConstant  ENCRYPTION_MODE = MCRYPT_MODE_CBC
>VConstant  ENCRYPTION_CIPHER = MCRYPT_RIJNDAEL_128
>VConstant  ENCRYPTION_BLOCK_SIZE = 16
>VConstant  ENCRYPTION_IV = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
>VConstantstring  MAILHIDE_SERVER = 'http://mailhide.recaptcha.net/d'
Url to the mailhide server
MAILHIDE_SERVER
string

Properties

>VPropertyprotectedstring $_email = null
The email address to protect
Default valuenullDetails
Type
string
>VPropertyprotectedstring $_emailDomainPart = null
The domain part of the email
Default valuenullDetails
Type
string
>VPropertyprotectedstring $_emailLocalPart = null
The local part of the email
Default valuenullDetails
Type
string
>VPropertyprotected\Zend_Validate_Interface $_emailValidator
>VPropertyprotectedstring $_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
NameTypeDescription
$publicKeystring
$privateKeystring
$emailstring
$optionsarray | \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
TypeDescription
string
methodprotected_getUrl() : string

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

Returns
TypeDescription
string
methodprotected_requireMcrypt() : void

See if the mcrypt extension is available

methodpublicgetDefaultOptions() : array

Get the default set of parameters

Returns
TypeDescription
array
methodpublicgetEmail() : string

Get the email property

Returns
TypeDescription
string
methodpublicgetEmailDomainPart() : string

Get the domain part of the email address

Returns
TypeDescription
string
methodpublicgetEmailLocalPart() : string

Get the local part of the email address

Returns
TypeDescription
string
methodpublicgetEmailValidator() : \Zend_Validate_Interface

Get emailValidator

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

Get the HTML code needed for the mail hide

Parameters
NameTypeDescription
$emailstring
Returns
TypeDescription
string
Throws
ExceptionDescription
\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
NameTypeDescription
$emailstring
Returns
TypeDescription
\Zend_Service_ReCaptcha_MailHide
methodpublicsetEmailValidator(\Zend_Validate_Interface $validator) : \Zend_Service_ReCaptcha_MailHide

Set email validator

Parameters
NameTypeDescription
$validator\Zend_Validate_Interface
Returns
TypeDescription
\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
NameTypeDescription
$privateKeystring
Returns
TypeDescription
\Zend_Service_ReCaptcha_MailHide
Documentation was generated by phpDocumentor 2.2.0 .