This commit is contained in:
2020-12-14 19:03:05 +08:00
parent e284c5d324
commit 4549364baf
9 changed files with 389 additions and 2 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace Annotation;
use Closure;
#[\Attribute(\Attribute::TARGET_METHOD)] class Interceptor
{
/**
* Middleware constructor.
* @param string|array $handler
*/
public function __construct(
private string|array $handler
)
{
}
/**
* @return array|string
*/
public function getMiddleware(): array|string
{
return $this->handler;
}
}