Api文档
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
740 B

1 year ago
<?php
1 year ago
namespace Plugins\ApiDoc\Admin\Attributes;
1 year ago
9 months ago
use JetBrains\PhpStorm\ExpectedValues;
1 year ago
/**
* Class Api
*
* @author chenlong<vip_chenlong@163.com>
* @date 2022/5/17 9:59
*/
#[\Attribute(\Attribute::TARGET_METHOD|\Attribute::TARGET_CLASS)]
class Api
{
9 months ago
public ?string $isAuthenticate = null;
1 year ago
/**
* @param bool $isAuthenticate 是否需要认证
*/
9 months ago
public function __construct(#[ExpectedValues(['strength', 'weak', true, false])] bool|string $isAuthenticate = false)
{
if ($isAuthenticate === true) {
$isAuthenticate = 'strength';
}
if ($isAuthenticate === false) {
$isAuthenticate = null;
}
$this->isAuthenticate = $isAuthenticate;
}
1 year ago
}