|
| __construct ($options=[]) |
| Instantiates hostname validator for local use.
|
|
| setMessage ($messageString, $messageKey=null) |
| Sets the validation failure message template for a particular key Adds the ability to set messages to the attached hostname validator.
|
|
| getHostnameValidator () |
| Returns the set hostname validator.
|
|
| setHostnameValidator (Hostname $hostnameValidator=null) |
|
| getAllow () |
| Returns the allow option of the attached hostname validator.
|
|
| setAllow ($allow) |
| Sets the allow option of the hostname validator to use.
|
|
| isMxSupported () |
| Whether MX checking via getmxrr is supported or not.
|
|
| getMxCheck () |
| Returns the set validateMx option.
|
|
| useMxCheck ($mx) |
| Set whether we check for a valid MX record via DNS.
|
|
| getDeepMxCheck () |
| Returns the set deepMxCheck option.
|
|
| useDeepMxCheck ($deep) |
| Use deep validation for MX records.
|
|
| getDomainCheck () |
| Returns the set domainCheck option.
|
|
| useDomainCheck ($domain=true) |
| Sets if the domain should also be checked or only the local part of the email address.
|
|
| getMXRecord () |
| Returns the found MX Record information after validation including weight for further processing.
|
|
| isValid ($value) |
| Defined by Zend.
|
|
| __construct ($options=null) |
| Abstract constructor for all validators A validator should accept following parameters:
|
|
| getOption ($option) |
| Returns an option.
|
|
| getOptions () |
| Returns all available options.
|
|
| setOptions ($options=[]) |
| Sets one or multiple options.
|
|
| getMessages () |
| Returns array of validation failure messages.
|
|
| __invoke ($value) |
| Invoke as command.
|
|
| getMessageVariables () |
| Returns an array of the names of variables that are used in constructing validation failure messages.
|
|
| getMessageTemplates () |
| Returns the message templates from the validator.
|
|
| setMessage ($messageString, $messageKey=null) |
| Sets the validation failure message template for a particular key.
|
|
| setMessages (array $messages) |
| Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings.
|
|
| __get ($property) |
| Magic function returns the value of the requested property, if and only if it is the value or a message variable.
|
|
| setValueObscured ($flag) |
| Set flag indicating whether or not value should be obfuscated in messages.
|
|
| isValueObscured () |
| Retrieve flag indicating whether or not value should be obfuscated in messages.
|
|
| setTranslator (Translator\TranslatorInterface $translator=null, $textDomain=null) |
| Set translation object.
|
|
| getTranslator () |
| Return translation object.
|
|
| hasTranslator () |
| Does this validator have its own specific translator?
|
|
| setTranslatorTextDomain ($textDomain= 'default') |
| Set translation text domain.
|
|
| getTranslatorTextDomain () |
| Return the translation text domain.
|
|
| setTranslatorEnabled ($flag=true) |
| Indicate whether or not translation should be enabled.
|
|
| isTranslatorEnabled () |
| Is translation enabled?
|
|
| setTranslator (TranslatorInterface $translator=null, $textDomain=null) |
| Sets translator to use in helper.
|
|
|
| isReserved ($host) |
| Returns if the given host is reserved.
|
|
| validateLocalPart () |
| Internal method to validate the local part of the email address.
|
|
| validateMXRecords () |
| Internal method to validate the servers MX records.
|
|
| validateHostnamePart () |
| Internal method to validate the hostname part of the email address.
|
|
| splitEmailParts ($value) |
| Splits the given value in hostname and local part of the email address.
|
|
| idnToAscii ($email) |
| Safely convert UTF-8 encoded domain name to ASCII.
|
|
| idnToUtf8 ($email) |
| Safely convert ASCII encoded domain name to UTF-8.
|
|
| createMessage ($messageKey, $value) |
| Constructs and returns a validation failure message with the given message key and value.
|
|
| error ($messageKey, $value=null) |
|
| getValue () |
| Returns the validation value.
|
|
| setValue ($value) |
| Sets the value to be validated and clears the messages and errors arrays.
|
|
| translateMessage ($messageKey, $message) |
| Translate a validation message.
|
|
__construct |
( |
|
$options = [] | ) |
|
Instantiates hostname validator for local use.
The following additional option keys are supported: 'hostnameValidator' => A hostname validator, see Zend 'allow' => Options for the hostname validator, see Zend::ALLOW_* 'strict' => Whether to adhere to strictest requirements in the spec 'useMxCheck' => If MX check should be enabled, boolean 'useDeepMxCheck' => If a deep MX check should be done, boolean
- Parameters
-
array | \Traversable | $options | OPTIONAL |
Returns if the given host is reserved.
The following addresses are seen as reserved '0.0.0.0/8', '10.0.0.0/8', '127.0.0.0/8' '100.64.0.0/10' '172.16.0.0/12' '198.18.0.0/15' '169.254.0.0/16', '192.168.0.0/16' '192.0.2.0/24', '192.88.99.0/24', '198.51.100.0/24', '203.0.113.0/24' '224.0.0.0/4', '240.0.0.0/4'
- See Also
- http://en.wikipedia.org/wiki/Reserved_IP_addresses
As of RFC5753 (JAN 2010), the following blocks are no longer reserved: