1
This commit is contained in:
21
app/admin/service/annotation/ControllerAnnotation.php
Normal file
21
app/admin/service/annotation/ControllerAnnotation.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\service\annotation;
|
||||
|
||||
use Attribute;
|
||||
|
||||
/**
|
||||
* controller 节点注解类
|
||||
*/
|
||||
#[Attribute]
|
||||
final class ControllerAnnotation
|
||||
{
|
||||
/**
|
||||
* @param string $title
|
||||
* @param bool $auth 是否需要权限
|
||||
* @param string|array $ignore
|
||||
*/
|
||||
public function __construct(public string $title = '', public bool $auth = true, public string|array $ignore = '')
|
||||
{
|
||||
}
|
||||
}
|
||||
19
app/admin/service/annotation/MiddlewareAnnotation.php
Normal file
19
app/admin/service/annotation/MiddlewareAnnotation.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\service\annotation;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_METHOD)]
|
||||
final class MiddlewareAnnotation
|
||||
{
|
||||
/** 过滤日志 */
|
||||
const IGNORE_LOG = 'LOG';
|
||||
|
||||
/** 免登录 */
|
||||
const IGNORE_LOGIN = 'LOGIN';
|
||||
|
||||
public function __construct(public string $type = '', public string|array $ignore = '')
|
||||
{
|
||||
}
|
||||
}
|
||||
25
app/admin/service/annotation/NodeAnnotation.php
Normal file
25
app/admin/service/annotation/NodeAnnotation.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\service\annotation;
|
||||
|
||||
use Attribute;
|
||||
|
||||
/**
|
||||
* action 节点注解类
|
||||
*/
|
||||
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_METHOD| Attribute::TARGET_PROPERTY)]
|
||||
final class NodeAnnotation
|
||||
{
|
||||
/** 过滤节点 */
|
||||
const IGNORE_NODE = 'NODE';
|
||||
|
||||
/**
|
||||
* @param string $title
|
||||
* @param bool $auth 是否需要权限
|
||||
* @param string|array $ignore
|
||||
*/
|
||||
public function __construct(public string $title = '', public bool $auth = true, public string|array $ignore = '')
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user