Skip to content

Commit

Permalink
修复 defer 属性
Browse files Browse the repository at this point in the history
  • Loading branch information
ueaner committed Feb 26, 2018
1 parent 2310302 commit c92c344
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/Soli/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ public function bind()

$service = $this;

$this->defer
? function () use ($service) {
return $service->register();
}
: $service->register();

$this->container->set(
$this->id,
function () use ($service) {
return $service->register();
},
$this->defer
$this->defer ? function () use ($service) { return $service->register(); } : $service->register()
);
}
}

0 comments on commit c92c344

Please sign in to comment.