Files
kiri-core/Annotation/Aspect.php
T

41 lines
602 B
PHP
Raw Normal View History

2021-03-29 02:34:31 +08:00
<?php
namespace Annotation;
2021-03-29 10:05:51 +08:00
use Exception;
2021-03-29 03:09:55 +08:00
use Snowflake\Aop;
use Snowflake\IAspect;
use Snowflake\Snowflake;
defined('ASPECT_ERROR') or define('ASPECT_ERROR', 'Aspect annotation must implement ');
2021-03-29 02:34:31 +08:00
/**
* Class Aspect
* @package Annotation
*/
2021-03-29 03:09:55 +08:00
#[\Attribute(\Attribute::TARGET_METHOD)] class Aspect extends Attribute
2021-03-29 02:34:31 +08:00
{
/**
* Aspect constructor.
2021-03-29 03:09:55 +08:00
* @param string $aspect
2021-03-29 02:34:31 +08:00
*/
2021-03-29 03:09:55 +08:00
public function __construct(public string $aspect)
2021-03-29 02:34:31 +08:00
{
}
2021-07-12 17:17:36 +08:00
/**
* @throws Exception
*/
public function execute(mixed $class, mixed $method = ''): bool
2021-03-29 02:34:31 +08:00
{
2021-05-03 03:48:52 +08:00
return true;
2021-03-29 02:34:31 +08:00
}
}