32 lines
634 B
PHP
32 lines
634 B
PHP
<?php
|
|
|
|
namespace mt;
|
|
|
|
use phpcommon;
|
|
|
|
class RankActivity {
|
|
|
|
public static function get($id)
|
|
{
|
|
return array_key_exists($id, self::getMetaList()) ? self::getMetaList()[$id] : null;
|
|
}
|
|
|
|
public static function isActivityPeriod($meta)
|
|
{
|
|
return $meta['opentime'] >= myself()->_getNowTime() &&
|
|
$meta['closetime'] < myself()->_getNowTime();
|
|
}
|
|
|
|
protected static function getMetaList()
|
|
{
|
|
if (!self::$metaList) {
|
|
self::$metaList = getMetaTable('rankActivity@rankActivity.php');
|
|
}
|
|
return self::$metaList;
|
|
}
|
|
|
|
|
|
protected static $metaList;
|
|
|
|
}
|