改名
This commit is contained in:
+10
-7
@@ -4,6 +4,7 @@
|
||||
namespace Annotation;
|
||||
|
||||
|
||||
use Exception;
|
||||
use Snowflake\Aop;
|
||||
use Snowflake\IAspect;
|
||||
use Snowflake\Snowflake;
|
||||
@@ -27,21 +28,23 @@ defined('ASPECT_ERROR') or define('ASPECT_ERROR', 'Aspect annotation must implem
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $handler
|
||||
* @return mixed
|
||||
*/
|
||||
/**
|
||||
* @param array $handler
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
public function execute(array $handler): mixed
|
||||
{
|
||||
if (!in_array(IAspect::class, class_implements($this->aspect))) {
|
||||
throw new \Exception(ASPECT_ERROR . IAspect::class);
|
||||
// TODO: Change the autogenerated stub
|
||||
if (!in_array(IAspect::class, class_implements($this->aspect))) {
|
||||
throw new Exception(ASPECT_ERROR . IAspect::class);
|
||||
}
|
||||
/** @var Aop $aop */
|
||||
$aop = Snowflake::app()->get('aop');
|
||||
|
||||
$aop->aop_add($handler, $this->aspect);
|
||||
|
||||
return parent::execute($handler); // TODO: Change the autogenerated stub
|
||||
return parent::execute($handler);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user