game2006api/webapp/mt/RankSeason.php
2022-10-10 17:39:05 +08:00

34 lines
731 B
PHP

<?php
namespace mt;
use phpcommon;
class RankSeason
{
public static function get($id)
{
return getXVal(self::getMetaList(), $id);
}
protected static function getMetaList()
{
if (!self::$metaList) {
self::$metaList = getMetaTable('pveGeminiMode@rankSeason.php');
}
return self::$metaList;
}
public static function getCurrentSeason()
{
foreach (self::getMetaList() as $meta) {
if (myself()->_getNowTime() >= strtotime($meta['start_time']) &&
myself()->_getNowTime() <= strtotime($meta['end_time'])) {
return $meta;
}
}
return null;
}
protected static $metaList;
}