You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
365 B
PHP
21 lines
365 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Helper;
|
|
|
|
class DeviceType
|
|
{
|
|
const ANDROID = 1;
|
|
const IOS = 2;
|
|
|
|
public static $deviceTypeList = [
|
|
self::ANDROID => '安卓',
|
|
self::IOS => '苹果',
|
|
];
|
|
|
|
public static function getDeviceTypeText($deviceType)
|
|
{
|
|
return self::$deviceTypeList[$deviceType] ?? '未知';
|
|
}
|
|
} |