改名
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
namespace Annotation\Route;
|
||||
|
||||
|
||||
use Snowflake\Snowflake;
|
||||
|
||||
/**
|
||||
* Class Interceptor
|
||||
* @package Annotation\Route
|
||||
@@ -15,9 +17,16 @@ namespace Annotation\Route;
|
||||
/**
|
||||
* Interceptor constructor.
|
||||
* @param string|array $interceptor
|
||||
* @throws
|
||||
*/
|
||||
public function __construct(public string|array $interceptor)
|
||||
{
|
||||
if (is_string($this->interceptor)) {
|
||||
$this->interceptor = [$this->interceptor];
|
||||
}
|
||||
foreach ($this->interceptor as $key => $item) {
|
||||
$this->interceptor[$key] = Snowflake::createObject($item);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user