<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Converter; use ModStart\Core\Dao\ModelUtil; use Module\Vendor\Html\HtmlConverterInterceptor; class AtMemberHtmlInterceptor implements HtmlConverterInterceptor { public function convert($bW35T) { goto blPjI; iWFj3: if (empty($hId04[1])) { return $bW35T; } goto rnZGP; CHyM4: return $bW35T; goto evp75; PonBe: $fstQg = ModelUtil::model('member_user')->whereIn('username', array_values($D_f5o))->get()->toArray(); goto yp316; KNVOl: if (empty($D_f5o)) { return $bW35T; } goto PonBe; blPjI: preg_match_all('/@(.*?):/', $bW35T, $hId04); goto iWFj3; yp316: if (empty($fstQg)) { return $bW35T; } goto Ltlr_; RG9oe: foreach ($hId04[1] as $DbHm9 => $Rr4gX) { goto bTwao; Q4Mth: if (empty($Rr4gX)) { continue; } goto g2BLN; bTwao: $Rr4gX = trim($Rr4gX); goto Q4Mth; g2BLN: $D_f5o[$hId04[0][$DbHm9]] = $Rr4gX; goto nWYVY; nWYVY: } goto KNVOl; Ltlr_: $faUBi = array(); goto dSV44; rnZGP: $D_f5o = array(); goto RG9oe; ynLvb: foreach ($D_f5o as $fAoIr => $Rr4gX) { goto AITuO; B18BV: $bW35T = str_replace($fAoIr, '<a href="' . $dv9dl . '" target="_blank">@' . $faUBi[$Rr4gX]['username'] . '</a>: ', $bW35T); goto RndEF; btdrL: $dv9dl = str_replace('{id}', $faUBi[$Rr4gX]['id'], '/member/{id}'); goto B18BV; AITuO: if (empty($faUBi[$Rr4gX])) { continue; } goto btdrL; RndEF: } goto CHyM4; dSV44: foreach ($fstQg as $QqUVI) { $faUBi[$QqUVI['username']] = $QqUVI; } goto ynLvb; evp75: } }