示例#1
0
文件: Event.php 项目: ppy/osu-web
 public function getDetailAttribute()
 {
     $value = $this->text;
     if (in_array($value, self::EVENT_TYPES, true)) {
         return ['type' => array_search_null($value, self::EVENT_TYPES)];
     } else {
         return ['type' => 'other', 'text' => $value];
     }
 }
示例#2
0
 public function getMessageTypeAttribute($value)
 {
     return array_search_null(get_int($value), static::MESSAGE_TYPES);
 }
示例#3
0
文件: Game.php 项目: ppy/osu-web
 public function getTeamTypeAttribute($value)
 {
     return array_search_null($value, self::TEAM_TYPES);
 }
示例#4
0
 public static function modeStr($int)
 {
     return array_search_null($int, static::MODES);
 }