<?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($ybjC4, $QqUVI) { goto b_xSM; fduMS: $w6bW5 = array(); goto RqZ06; RqZ06: foreach ($moUFd as $KAKiA) { $w6bW5['{' . $KAKiA . '}'] = isset($QqUVI[$KAKiA]) ? $QqUVI[$KAKiA] : ''; } goto a6PLL; DacWO: $moUFd = array('id', 'username'); goto fduMS; SHYyp: if (!is_array($QqUVI)) { $QqUVI = MemberUtil::getCached($QqUVI); } goto DacWO; b_xSM: BizException::throwsIfEmpty('用户为空', $QqUVI); goto SHYyp; a6PLL: return str_replace(array_keys($w6bW5), array_values($w6bW5), $ybjC4); goto WB3DG; WB3DG: } public static function paramTitle() { return '<a href="javascript:;" data-dialog-request="' . modstart_admin_url('member/config/param') . '"><i class="iconfont icon-code"></i> 动态变量</a>'; } }