This commit is contained in:
2021-08-02 19:06:44 +08:00
parent 8a4c5dab54
commit 6bbd153c6a
3 changed files with 32 additions and 31 deletions
+7 -7
View File
@@ -34,13 +34,13 @@ defined('ASPECT_ERROR') or define('ASPECT_ERROR', 'Aspect annotation must implem
public function execute(mixed $class, mixed $method = ''): bool
{
// 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::getDi()->get(Aop::class);
$aop->aop_add([$class, $method], $this->aspect);
// if (!in_array(IAspect::class, class_implements($this->aspect))) {
// throw new Exception(ASPECT_ERROR . IAspect::class);
// }
// /** @var Aop $aop */
// $aop = Snowflake::getDi()->get(Aop::class);
//
// $aop->aop_add([$class, $method], $this->aspect);
return true;
}