Skip to content

Commit b056d39

Browse files
3.5.0-beta版本
增加了AOP配置的支持
1 parent 67e4526 commit b056d39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Server/Components/AOP/Proxy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __call($name, $arguments)
3838
$aspect['instance'] = Pool::getInstance()->get($aspect['aspect_class']);
3939
$aspect['instance']->init($this->own, $this->class_name,$name, $arguments);
4040
$instance = $aspect['instance'];
41-
$before = $aspect['before_method'];
41+
$before = $aspect['before_method']??null;
4242
if(!empty($before)) {
4343
$instance->$before();
4444
}
@@ -50,7 +50,7 @@ public function __call($name, $arguments)
5050
$isThrow = true;
5151
foreach ($aspects as $aspect){
5252
$instance = $aspect['instance'];
53-
$throw = $aspect['throw_method'];
53+
$throw = $aspect['throw_method']??null;
5454
if(!empty($throw)) {
5555
$instance->$throw($e);
5656
}
@@ -59,7 +59,7 @@ public function __call($name, $arguments)
5959
}finally{
6060
foreach ($aspects as $aspect){
6161
$instance = $aspect['instance'];
62-
$after = $aspect['after_method'];
62+
$after = $aspect['after_method']??null;
6363
if(!empty($after)) {
6464
$instance->$after($isThrow);
6565
}

0 commit comments

Comments
 (0)