Files
OMS/app/eccommon/lib/view/compiler.php
2025-12-28 23:13:25 +08:00

51 lines
1.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
class eccommon_view_compiler{
function compile_modifier_cur($attrs,&$compile) {
if(!strpos($attrs,',') || false!==strpos($attrs,',')){
return $attrs = 'app::get(\'eccommon\')->model(\'currency\')->changer('.$attrs.')';
}
}
/**
* compile_modifier_cur_name
* @param mixed $attrs attrs
* @param mixed $compile compile
* @return mixed 返回值
*/
public function compile_modifier_cur_name($attrs,&$compile) {
if(!strpos($attrs,',') || false!==strpos($attrs,',')){
return $attrs = 'app::get(\'eccommon\')->model(\'currency\')->get_cur_name('.$attrs.')';
}
}
/**
* compile_modifier_pay_name
* @param mixed $attrs attrs
* @return mixed 返回值
*/
public function compile_modifier_pay_name($attrs) {
//todo 需要将货币汇率也缓存
if(!strpos($attrs,',') || false!==strpos($attrs,',')){
return $attrs = 'app::get(\'eccommon\')->model(\'payment_cfgs\')->get_app_display_name('.$attrs.')';
}
}
/**
* compile_modifier_operactor_name
* @param mixed $attrs attrs
* @return mixed 返回值
*/
public function compile_modifier_operactor_name($attrs) {
if (!strpos($attrs,',') || false!==strpos($attrs,',')){
return $attrs = 'app::get(\'pam\')->model(\'account\')->get_operactor_name('.$attrs.')';
}
}
}