✏️ 正在编辑: Validate.php
路径:
/home/bpioifn/www/pigmentse/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Validate.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php /* * This file is part of SwiftMailer. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Utility Class allowing users to simply check expressions again Swift Grammar. * * @author Xavier De Cock <xdecock@gmail.com> */ class Swift_Validate { /** * Grammar Object. * * @var Swift_Mime_Grammar */ private static $grammar = null; /** * Checks if an e-mail address matches the current grammars. * * @param string $email * * @return bool */ public static function email($email) { if (self::$grammar === null) { self::$grammar = Swift_DependencyContainer::getInstance() ->lookup('mime.grammar'); } return (bool) preg_match( '/^'.self::$grammar->getDefinition('addr-spec').'$/D', $email ); } }
💾 保存文件
← 返回文件管理器