This commit is contained in:
aozhiwei 2020-12-01 16:33:20 +08:00
parent d8905a842c
commit 190921fd12

26
webapp/metatable/item.php Normal file
View File

@ -0,0 +1,26 @@
<?php
namespace metatable;
use phpcommon;
function getItemConf()
{
return _internalGetItemConf();
}
function getItemById($param_id)
{
$conf = getItemConf();
$item_id = (int)$item_id;
return array_key_exists($item_id, $conf) ? $conf[$item_id] : null;
}
function _internalGetItemConf()
{
global $g_item_table;
if (!$g_item_table) {
$g_item_table = require(getConfigBaseDir() . 'item@item.php');
}
return $g_item_table;
}