41 lines
849 B
PHP
41 lines
849 B
PHP
<?php
|
|
|
|
namespace mt;
|
|
|
|
use phpcommon;
|
|
|
|
class HashRateTask {
|
|
const PLAYING = 1;
|
|
const STAKING = 2;
|
|
const TRADING = 3;
|
|
const CONSUMING = 4;
|
|
const COMMUNITY = 5;
|
|
const NFT = 6;
|
|
public static function find($id){
|
|
return getXVal(self::getMetaList(), $id, null);
|
|
}
|
|
|
|
public static function getListByType($type){
|
|
$mateList = array();
|
|
foreach (self::getMetaList() as $mate){
|
|
if ($mate['type'] == $type){
|
|
array_push($mateList,$mate);
|
|
}
|
|
}
|
|
return $mateList;
|
|
}
|
|
|
|
|
|
|
|
public static function getMetaList()
|
|
{
|
|
if (!self::$metaList) {
|
|
self::$metaList = getMetaTable('HashRateTask@HashRateTask.php');
|
|
}
|
|
return self::$metaList;
|
|
}
|
|
|
|
protected static $metaList;
|
|
|
|
}
|