初始化本地仓库
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\enum\web;
|
||||
|
||||
use core\interface\IEnum;
|
||||
|
||||
/**
|
||||
* 菜单分类枚举
|
||||
*/
|
||||
enum MenuCategory: int implements IEnum
|
||||
{
|
||||
case NAV = 1; // 导航菜单
|
||||
case MEMBER = 2; // 会员菜单
|
||||
|
||||
/**
|
||||
* 获取文本
|
||||
*/
|
||||
public function text(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::NAV => '导航菜单',
|
||||
self::MEMBER => '会员菜单',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取标签
|
||||
*/
|
||||
public function label(): string
|
||||
{
|
||||
return $this->text();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user