Files
kiri-core/Annotation/Route/Interceptor.php
T
2021-02-23 14:21:43 +08:00

40 lines
601 B
PHP

<?php
namespace Annotation\Route;
use Annotation\IAnnotation;
use ReflectionException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake;
/**
* Class Interceptor
* @package Annotation\Route
*/
#[\Attribute(\Attribute::TARGET_METHOD)] class Interceptor implements IAnnotation
{
/**
* Interceptor constructor.
* @param string|array $interceptor
* @throws
*/
public function __construct(public string|array $interceptor)
{
}
/**
* @param array $handler
* @return Interceptor
*/
public function execute(array $handler): static
{
return $this;
}
}