<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Html; use ModStart\Core\Util\HtmlUtil; use Module\Vendor\Markdown\MarkdownUtil; class HtmlConverter { public static function convertToHtml($qVI8O, $MPmfx, $U6Uye = null) { goto fbf0b; oEhjz: if (!empty($U6Uye)) { if (is_array($U6Uye)) { foreach ($U6Uye as $xtbi2) { $Fpmtn = new $xtbi2(); $ZhTLO = $Fpmtn->convert($ZhTLO); } } else { $Fpmtn = new $U6Uye(); $ZhTLO = $Fpmtn->convert($ZhTLO); } } goto YA2G8; fbf0b: switch ($qVI8O) { case HtmlType::RICH_TEXT: $ZhTLO = HtmlUtil::filter($MPmfx); break; case HtmlType::MARKDOWN: goto ezxFX; v1vnn: break; goto iVoeq; ezxFX: $ZhTLO = MarkdownUtil::convertToHtml($MPmfx); goto d6A3V; d6A3V: $ZhTLO = HtmlUtil::filter($ZhTLO); goto v1vnn; iVoeq: case HtmlType::SIMPLE_TEXT: $ZhTLO = HtmlUtil::text2html($MPmfx); break; default: throw new \Exception('HtmlConverter.convertToHtml contentType error'); } goto oEhjz; YA2G8: return $ZhTLO; goto xTftV; xTftV: } }