34 lines
600 B
PHP
34 lines
600 B
PHP
<?php
|
|
|
|
|
|
namespace mt;
|
|
|
|
|
|
class MapMode
|
|
{
|
|
public static function find($id){
|
|
return getXVal(self::getMetaList(), $id);
|
|
}
|
|
|
|
public static function findByMapMode($modeId){
|
|
foreach (self::getMetaList() as $meta){
|
|
if ($meta['mapMode'] == $modeId){
|
|
return $meta;
|
|
}
|
|
}
|
|
return array();
|
|
}
|
|
|
|
|
|
|
|
protected static function getMetaList()
|
|
{
|
|
if (!self::$metaList) {
|
|
self::$metaList = getMetaTable('mapMode@mapMode.php');
|
|
}
|
|
return self::$metaList;
|
|
}
|
|
|
|
protected static $metaList;
|
|
|
|
} |