<?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($ZhTLO) { goto goB5u; AP632: foreach ($Uy2Nw[1] as $OPJGK => $SYNLL) { goto bVstq; e3gFt: if (empty($SYNLL)) { continue; } goto KzzRw; KzzRw: $VO3qb[$Uy2Nw[0][$OPJGK]] = $SYNLL; goto jOB0V; bVstq: $SYNLL = trim($SYNLL); goto e3gFt; jOB0V: } goto aBzGe; OGbjY: if (empty($sHpVc)) { return $ZhTLO; } goto hJICn; PSeVt: $sHpVc = ModelUtil::model('member_user')->whereIn('username', array_values($VO3qb))->get()->toArray(); goto OGbjY; Xp3Kf: foreach ($sHpVc as $J09PA) { $XIFxk[$J09PA['username']] = $J09PA; } goto E9X2X; aBzGe: if (empty($VO3qb)) { return $ZhTLO; } goto PSeVt; mgepW: $VO3qb = array(); goto AP632; E9X2X: foreach ($VO3qb as $cAxgm => $SYNLL) { goto BhbDu; BhbDu: if (empty($XIFxk[$SYNLL])) { continue; } goto L2qNB; rayIZ: $ZhTLO = str_replace($cAxgm, '<a href="' . $F_qhu . '" target="_blank">@' . $XIFxk[$SYNLL]['username'] . '</a>: ', $ZhTLO); goto z_SUc; L2qNB: $F_qhu = str_replace('{id}', $XIFxk[$SYNLL]['id'], '/member/{id}'); goto rayIZ; z_SUc: } goto MawdZ; MawdZ: return $ZhTLO; goto JIk3Y; zptLC: if (empty($Uy2Nw[1])) { return $ZhTLO; } goto mgepW; goB5u: preg_match_all('/@(.*?):/', $ZhTLO, $Uy2Nw); goto zptLC; hJICn: $XIFxk = array(); goto Xp3Kf; JIk3Y: } }