1
This commit is contained in:
parent
d8905a842c
commit
190921fd12
26
webapp/metatable/item.php
Normal file
26
webapp/metatable/item.php
Normal 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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user