src/Controller.php
protected function getEmail(string $name = 'email', string $default = ''): string
    {
        $v = $this->getString($name, $default);
        if ($v and false === filter_var($v, FILTER_VALIDATE_EMAIL)) {
            trigger_error('邮箱格式错误', E_USER_ERROR);
        }
        return $v;
    }
protected function getEmail(string $name = 'email', string $default = ''): string
    {
        $v = $this->getString($name, $default);
        if ($v and false === filter_var($v, FILTER_VALIDATE_EMAIL)) {
            trigger_error('邮箱格式错误', E_USER_ERROR);
        }
        return $v;
    }
获取Email地址,可以缺省
@param string $name
@param string $default
@return string