Skip to content

Commit

Permalink
chore: various updates
Browse files Browse the repository at this point in the history
  • Loading branch information
pandawabot committed Sep 9, 2022
1 parent 1e2e77d commit a303e49
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Bundle/Bundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ abstract class Bundle implements BundleContract
*/
private array $initializedPlugins = [];

private bool $pluginConfigured = false;

private bool $pluginBooted = false;

public function __construct(protected Application $app)
{
if ($this instanceof HasPluginInterface) {
Expand Down Expand Up @@ -207,6 +211,12 @@ public function isDeferred(): bool

public function configurePlugin(): void
{
if ($this->pluginConfigured) {
return;
}

$this->pluginConfigured = true;

foreach ($this->initializedPlugins as $plugin) {
$plugin->configure();
}
Expand All @@ -222,6 +232,12 @@ public function configure(): void

public function bootPlugin(): void
{
if ($this->pluginBooted) {
return;
}

$this->pluginBooted = true;

foreach ($this->initializedPlugins as $plugin) {
$plugin->boot();
}
Expand Down

0 comments on commit a303e49

Please sign in to comment.