Files
kiri-core/Annotation/Route/After.php
T
2021-02-23 14:16:08 +08:00

45 lines
720 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 After implements IAnnotation
{
/**
* Interceptor constructor.
* @param \HttpServer\IInterface\After|\HttpServer\IInterface\After[] $after
* @throws
*/
public function __construct(public string|array $after)
{
if (!is_string($this->after)) {
return;
}
$this->after = [$this->after];
}
/**
* @param array $handler
* @return array|string
*/
public function execute(array $handler): array|string
{
return $this;
}
}