<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Html; use ModStart\Core\Util\HtmlUtil; use Module\Vendor\Markdown\MarkdownUtil; class HtmlConverter { public static function convertToHtml($PW3lh, $V0Dls, $eoVVT = null) { goto f0MLZ; tdsd3: return $S_vgw; goto HWNtr; KlCQM: if (!empty($eoVVT)) { if (is_array($eoVVT)) { foreach ($eoVVT as $pDREl) { $ptV5f = new $pDREl(); $S_vgw = $ptV5f->convert($S_vgw); } } else { $ptV5f = new $eoVVT(); $S_vgw = $ptV5f->convert($S_vgw); } } goto tdsd3; f0MLZ: switch ($PW3lh) { case HtmlType::RICH_TEXT: $S_vgw = HtmlUtil::filter($V0Dls); break; case HtmlType::MARKDOWN: goto ARO_U; ARO_U: $S_vgw = MarkdownUtil::convertToHtml($V0Dls); goto hyTXy; hyTXy: $S_vgw = HtmlUtil::filter($S_vgw); goto m3fkG; m3fkG: break; goto S3NTm; S3NTm: case HtmlType::SIMPLE_TEXT: $S_vgw = HtmlUtil::text2html($V0Dls); break; default: throw new \Exception('HtmlConverter.convertToHtml contentType error'); } goto KlCQM; HWNtr: } }