/** * Validate an e-mail address * * @param unknown $email * @return number */ static function validateEmail($email) { if (PostmanOptions::getInstance()->isEmailValidationDisabled()) { return true; } require_once 'Postman-Mail/Zend-1.12.10/Exception.php'; require_once 'Postman-Mail/Zend-1.12.10/Registry.php'; require_once 'Postman-Mail/Zend-1.12.10/Validate/Exception.php'; require_once 'Postman-Mail/Zend-1.12.10/Validate/Interface.php'; require_once 'Postman-Mail/Zend-1.12.10/Validate/Abstract.php'; require_once 'Postman-Mail/Zend-1.12.10/Validate/Ip.php'; require_once 'Postman-Mail/Zend-1.12.10/Validate/Hostname.php'; require_once 'Postman-Mail/Zend-1.12.10/Validate/EmailAddress.php'; if (!isset(PostmanUtils::$emailValidator)) { PostmanUtils::$emailValidator = new Postman_Zend_Validate_EmailAddress(); } return PostmanUtils::$emailValidator->isValid($email); }
public static function staticInit() { PostmanUtils::$logger = new PostmanLogger('PostmanUtils'); PostmanUtils::$emailValidator = new Postman_Zend_Validate_EmailAddress(); }