<?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($S_vgw) { goto GmioO; GmioO: preg_match_all('/@(.*?):/', $S_vgw, $YpeHe); goto oV__5; i0glw: foreach ($YpeHe[1] as $xZl3o => $Y4bh3) { goto RtB5a; OSEt3: if (empty($Y4bh3)) { continue; } goto Hi4L4; Hi4L4: $SL7sM[$YpeHe[0][$xZl3o]] = $Y4bh3; goto rhTc1; RtB5a: $Y4bh3 = trim($Y4bh3); goto OSEt3; rhTc1: } goto XPHRZ; f1Dcn: if (empty($prI60)) { return $S_vgw; } goto TTbrK; TTbrK: $dYcTq = array(); goto xGrBt; KWdtQ: foreach ($SL7sM as $iQIBI => $Y4bh3) { goto OuQCM; aNYHj: $onmNJ = str_replace('{id}', $dYcTq[$Y4bh3]['id'], '/member/{id}'); goto JrR59; OuQCM: if (empty($dYcTq[$Y4bh3])) { continue; } goto aNYHj; JrR59: $S_vgw = str_replace($iQIBI, '<a href="' . $onmNJ . '" target="_blank">@' . $dYcTq[$Y4bh3]['username'] . '</a>: ', $S_vgw); goto Ul_G0; Ul_G0: } goto jlaVJ; Wjo8u: $prI60 = ModelUtil::model('member_user')->whereIn('username', array_values($SL7sM))->get()->toArray(); goto f1Dcn; XPHRZ: if (empty($SL7sM)) { return $S_vgw; } goto Wjo8u; jlaVJ: return $S_vgw; goto Knf7Z; oi0YZ: $SL7sM = array(); goto i0glw; oV__5: if (empty($YpeHe[1])) { return $S_vgw; } goto oi0YZ; xGrBt: foreach ($prI60 as $KAIwS) { $dYcTq[$KAIwS['username']] = $KAIwS; } goto KWdtQ; Knf7Z: } }