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.
INVALID = 'emailAddressInvalid'
INVALID_FORMAT = 'emailAddressInvalidFormat'
INVALID_HOSTNAME = 'emailAddressInvalidHostname'
INVALID_MX_RECORD = 'emailAddressInvalidMxRecord'
INVALID_SEGMENT = 'emailAddressInvalidSegment'
DOT_ATOM = 'emailAddressDotAtom'
QUOTED_STRING = 'emailAddressQuotedString'
INVALID_LOCAL_PART = 'emailAddressInvalidLocalPart'
LENGTH_EXCEEDED = 'emailAddressLengthExceeded'
string $_hostname = ''
array $_invalidIp = 'array'
string $_localPart = ''
array $_messageTemplates = 'array'
array $_messageVariables = 'array'
$_options = 'array'
Internal options array
__construct(
array|Zend_Config $options
=
array
)
:
void
Instantiates hostname validator for local use
The following option keys are supported: 'hostname' => A hostname validator, see Zend_Validate_Hostname 'allow' => Options for the hostname validator, see Zend_Validate_Hostname::ALLOW_* 'mx' => If MX check should be enabled, boolean 'deep' => If a deep MX check should be done, boolean
_isReserved(
string $host
)
:
boolean
Returns if the given host is reserved
_toIp(
string $binary
)
:
mixed
Converts a binary string to an IP address
_validateHostnamePart(
)
:
boolean
Internal method to validate the hostname part of the email address
_validateLocalPart(
)
:
boolean
Internal method to validate the local part of the email address
_validateMXRecords(
)
:
boolean
Internal method to validate the servers MX records
getDeepMxCheck(
)
:
boolean
Returns the set deepMxCheck option
getDomainCheck(
)
:
unknown
Returns the set domainCheck option
getHostnameValidator(
)
:
Zend_Validate_Hostname
Returns the set hostname validator
getOptions(
)
:
array
Returns all set Options
getValidateMx(
)
:
boolean
Returns the set validateMx option
isValid(
string $value
)
:
boolean
Defined by Zend_Validate_Interface
Returns true if and only if $value is a valid email address according to RFC2822
setDeepMxCheck(
boolean $deep
)
:
Zend_Validate_EmailAddress
Set whether we check MX record should be a deep validation
setDomainCheck(
boolean $domain
=
true
)
:
Zend_Validate_EmailAddress
Sets if the domain should also be checked or only the local part of the email address
setHostnameValidator(
Zend_Validate_Hostname $hostnameValidator
=
null, int $allow
=
Zend_Validate_Hostname
)
:
void
setMessage(
string $messageString, string $messageKey
=
null
)
:
Zend_Validate_Abstract
Sets the validation failure message template for a particular key Adds the ability to set messages to the attached hostname validator
setOptions(
array $options
=
array
)
:
Zend_Validate_EmailAddress
Set options for the email validator
setValidateMx(
boolean $mx
)
:
Zend_Validate_EmailAddress
Set whether we check for a valid MX record via DNS
This only applies when DNS hostnames are validated
validateMxSupported(
)
:
boolean
Whether MX checking via getmxrr is supported or not
This currently only works on UNIX systems