<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Html; use ModStart\Core\Util\HtmlUtil; use Module\Vendor\Markdown\MarkdownUtil; class HtmlConverter { public static function convertToHtml($btOF0, $ybjC4, $uofDa = null) { goto gGJyX; YTnwV: if (!empty($uofDa)) { if (is_array($uofDa)) { foreach ($uofDa as $yvy_8) { $n95uW = new $yvy_8(); $bW35T = $n95uW->convert($bW35T); } } else { $n95uW = new $uofDa(); $bW35T = $n95uW->convert($bW35T); } } goto Q3vKG; gGJyX: switch ($btOF0) { case HtmlType::RICH_TEXT: $bW35T = HtmlUtil::filter($ybjC4); break; case HtmlType::MARKDOWN: goto mst_L; tgelr: break; goto utM1y; atLFl: $bW35T = HtmlUtil::filter($bW35T); goto tgelr; mst_L: $bW35T = MarkdownUtil::convertToHtml($ybjC4); goto atLFl; utM1y: case HtmlType::SIMPLE_TEXT: $bW35T = HtmlUtil::text2html($ybjC4); break; default: throw new \Exception('HtmlConverter.convertToHtml contentType error'); } goto YTnwV; Q3vKG: return $bW35T; goto ETUIT; ETUIT: } }