game2006api/webapp/mt/Shop.php
2022-11-02 11:25:21 +08:00

40 lines
751 B
PHP

<?php
namespace mt;
use phpcommon;
class Shop {
const OUTSIDE_SHOP = 100;
public static function get($id)
{
return getXVal(self::getMetaList(), $id);
}
public static function all()
{
if (!self::$shopNameList) {
self::$shopNameList = array();
foreach(self::getMetaList() as $meta) {
array_push(self::$shopNameList, $meta);
}
}
return self::$shopNameList;
}
protected static function getMetaList()
{
if (!self::$metaList) {
self::$metaList = getMetaTable('shop@shop.php');
}
return self::$metaList;
}
protected static $shopNameList;
protected static $metaList;
}