1
This commit is contained in:
parent
56af030651
commit
ac5ac6fbf1
39
webapp/mt/HashRateShop.php
Normal file
39
webapp/mt/HashRateShop.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace mt;
|
||||
|
||||
use phpcommon;
|
||||
|
||||
class HashRateShop {
|
||||
|
||||
public static function find($id){
|
||||
return getXVal(self::getMetaList(), $id, null);
|
||||
}
|
||||
|
||||
public static function findHash($itemId){
|
||||
return getXVal(self::getHashMetaList(), $itemId, null);
|
||||
}
|
||||
|
||||
protected static function getMetaList()
|
||||
{
|
||||
if (!self::$metaList) {
|
||||
self::$metaList = getMetaTable('hashrateshop@hashrateshop.php');
|
||||
}
|
||||
return self::$metaList;
|
||||
}
|
||||
|
||||
protected static function getHashMetaList()
|
||||
{
|
||||
if (!self::$hashMetaList) {
|
||||
self::$hashMetaList = array();
|
||||
foreach (self::getMetaList() as $meta) {
|
||||
self::$hashMetaList[$meta['item_id']] = $meta;
|
||||
}
|
||||
}
|
||||
return self::$hashMetaList;
|
||||
}
|
||||
|
||||
protected static $metaList;
|
||||
protected static $hashMetaList;
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user