public static function parseName($name)
    {
        $name = urldecode($name);
        $names = explode(' ', str_replace(',', '', $name));

        $pretitle = $first_name = $last_name = $posttitle = '';

        foreach ($names as $name) {
            if (('.' === mb_substr($name, -1) || 'et' === $name) && empty($first_name)) {
                $pretitle .= $name.' ';
                continue;
            }
            if (empty($first_name)) {
                $first_name = $name;
                continue;
            }
            if ('.' === mb_substr($name, -1) && !empty($last_name)) {
                $posttitle .= $name.' ';
                continue;
            }
            if (!empty($first_name)) {
                $last_name .= $name.' ';
                continue;
            }
        }

        return [
            trim($pretitle),
            mb_convert_case(trim(mb_strtolower($first_name)), MB_CASE_TITLE, 'UTF-8'),
            mb_convert_case(trim(mb_strtolower($last_name)), MB_CASE_TITLE, 'UTF-8'),
            trim($posttitle),
        ];
    }