This commit is contained in:
as2252258@163.com
2021-08-03 02:35:54 +08:00
parent 61308c5b41
commit e3b9b6f81b
+14 -10
View File
@@ -128,15 +128,6 @@ class Node extends HttpService
$this->callback = $manager->callerMiddlewares(
$this->handler[0], $this->handler[1], $this->aopHandler($this->getAop())
);
if ($this->path == '/user/attributes'){
[$controller, $action] = $this->handler;
$aspect = Snowflake::getDi()->getMethodAttribute($controller::class, $action);
var_dump($aspect);
}
}
return $this;
}
@@ -189,9 +180,22 @@ class Node extends HttpService
if (empty($aspect)) {
return null;
}
// if ($this->path == '/user/attributes'){
// [$controller, $action] = $this->handler;
//
// $aspect = Snowflake::getDi()->getMethodAttribute($controller::class, $action);
//
// var_dump($aspect);
// }
foreach ($aspect as $value) {
$implements = class_implements($value);
if (isset($implements[IAspect::class])) {
if ($this->path == '/user/attributes') {
var_dump($aspect);
}
if (isset($implements[IAspect::class])) {
return $value;
}
}