<?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($n16LT, $g3uu_) { goto A0m1F; ziGSx: if (!is_array($g3uu_)) { $g3uu_ = MemberUtil::getCached($g3uu_); } goto kPwDa; A0m1F: BizException::throwsIfEmpty('用户为空', $g3uu_); goto ziGSx; G3UqS: return str_replace(array_keys($qOrzw), array_values($qOrzw), $n16LT); goto o7cTj; kPwDa: $XAc8y = array('id', 'username'); goto q5czW; q5czW: $qOrzw = array(); goto GwZSw; GwZSw: foreach ($XAc8y as $kEhTf) { $qOrzw['{' . $kEhTf . '}'] = isset($g3uu_[$kEhTf]) ? $g3uu_[$kEhTf] : ''; } goto G3UqS; o7cTj: } public static function paramTitle() { return '<a href="javascript:;" data-dialog-request="' . modstart_admin_url('member/config/param') . '"><i class="iconfont icon-code"></i> 动态变量</a>'; } }