Files
kiri-core/Annotation/Middleware.php
T

34 lines
369 B
PHP
Raw Normal View History

2020-12-14 19:03:05 +08:00
<?php
namespace Annotation;
use Closure;
#[\Attribute(\Attribute::TARGET_METHOD)] class Middleware
{
/**
* Middleware constructor.
* @param string|array $handler
*/
public function __construct(
private string|array $handler
)
{
}
/**
* @return array|string
*/
public function getMiddleware(): array|string
{
return $this->handler;
}
}