<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Util; use ModStart\Core\Exception\BizException; class MemberParamUtil { public static function param() { return array('{id}' => '用户ID', '{username}' => '用户名'); } public static function replaceParam($V0Dls, $KAIwS) { goto pBNwE; XToV7: $uxJUJ = array(); goto zTw6_; aDyli: $YReV2 = array('id', 'username'); goto XToV7; zTw6_: foreach ($YReV2 as $D5qRP) { $uxJUJ['{' . $D5qRP . '}'] = isset($KAIwS[$D5qRP]) ? $KAIwS[$D5qRP] : ''; } goto ogtrM; ogtrM: return str_replace(array_keys($uxJUJ), array_values($uxJUJ), $V0Dls); goto ZqNiv; Sko67: if (!is_array($KAIwS)) { $KAIwS = MemberUtil::getCached($KAIwS); } goto aDyli; pBNwE: BizException::throwsIfEmpty('用户为空', $KAIwS); goto Sko67; ZqNiv: } public static function paramTitle() { return '<a href="javascript:;" data-dialog-request="' . modstart_admin_url('member/config/param') . '"><i class="iconfont icon-code"></i> 动态变量</a>'; } }