<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Html; use ModStart\Core\Util\HtmlUtil; use Module\Vendor\Markdown\MarkdownUtil; class HtmlConverter { public static function convertToHtml($P6dWM, $n16LT, $qiYsw = null) { goto KpfX0; UJti0: return $AZvp2; goto iArfQ; J8m5s: if (!empty($qiYsw)) { if (is_array($qiYsw)) { foreach ($qiYsw as $F1RBY) { $PhDXH = new $F1RBY(); $AZvp2 = $PhDXH->convert($AZvp2); } } else { $PhDXH = new $qiYsw(); $AZvp2 = $PhDXH->convert($AZvp2); } } goto UJti0; KpfX0: switch ($P6dWM) { case HtmlType::RICH_TEXT: $AZvp2 = HtmlUtil::filter($n16LT); break; case HtmlType::MARKDOWN: goto CzMjL; CzMjL: $AZvp2 = MarkdownUtil::convertToHtml($n16LT); goto lT990; lT990: $AZvp2 = HtmlUtil::filter($AZvp2); goto laD5o; laD5o: break; goto Wt6GZ; Wt6GZ: case HtmlType::SIMPLE_TEXT: $AZvp2 = HtmlUtil::text2html($n16LT); break; default: throw new \Exception('HtmlConverter.convertToHtml contentType error'); } goto J8m5s; iArfQ: } }