This commit is contained in:
2021-02-23 14:45:50 +08:00
parent e789002c9e
commit 27f6c88cbf
6 changed files with 24 additions and 35 deletions
+6 -1
View File
@@ -5,6 +5,7 @@ namespace Annotation\Route;
use Annotation\IAnnotation;
use JetBrains\PhpStorm\Pure;
use ReflectionException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake;
@@ -16,14 +17,18 @@ use Snowflake\Snowflake;
#[\Attribute(\Attribute::TARGET_METHOD)] class Interceptor implements IAnnotation
{
use Node;
/**
* Interceptor constructor.
* @param string|array $interceptor
* @throws
*/
public function __construct(public string|array $interceptor)
#[Pure] public function __construct(public string|array $interceptor)
{
if (is_string($this->interceptor)) {
$this->interceptor = [];
}
}