This commit is contained in:
as2252258@163.com
2021-08-11 01:04:57 +08:00
parent 63d8eaa4a5
commit 682246df28
219 changed files with 790 additions and 791 deletions
+5 -5
View File
@@ -1,19 +1,19 @@
<?php
namespace Snowflake;
namespace Kiri;
use Exception;
use ReflectionException;
use Snowflake\Abstracts\Component;
use Kiri\Abstracts\Component;
defined('ASPECT_ERROR') or define('ASPECT_ERROR', 'Aspect annotation must implement ');
/**
* Class Aop
* @package Snowflake
* @package Kiri
*/
class Aop extends Component
{
@@ -61,7 +61,7 @@ class Aop extends Component
{
$aopName = $handler[0]::class . '::' . $handler[1];
$reflect = Snowflake::getDi()->getReflect(current(static::$_aop[$aopName]));
$reflect = Kiri::getDi()->getReflect(current(static::$_aop[$aopName]));
if (!$reflect->isInstantiable() || !$reflect->hasMethod('invoke')) {
throw new Exception(ASPECT_ERROR . IAspect::class);
}
@@ -81,7 +81,7 @@ class Aop extends Component
{
$aopName = $handler[0]::class . '::' . $handler[1];
$reflect = Snowflake::getDi()->get(current(static::$_aop[$aopName]));
$reflect = Kiri::getDi()->get(current(static::$_aop[$aopName]));
if (!method_exists($reflect, 'invoke')) {
throw new Exception(ASPECT_ERROR . IAspect::class);
}