Skip to content

Commit

Permalink
feat:绑定服务支持回调
Browse files Browse the repository at this point in the history
  • Loading branch information
vartruexuan committed Nov 3, 2022
1 parent ad00190 commit 0300b8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/EasyWechat.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ protected function getApp(string $appName = self::APP_OFFICIAL_ACCOUNT, $config
protected function rebind(ServiceContainer &$app, $rebinds)
{
foreach ($rebinds as $id => $rebind) {
if (is_callable($rebind)) {
$rebind = call_user_func($rebind);
}
$app->rebind($id, $rebind);
}
}
Expand Down

0 comments on commit 0300b8f

Please sign in to comment.