Skip to content

Commit

Permalink
Merge pull request #9 from codions/develop
Browse files Browse the repository at this point in the history
Small fixes
  • Loading branch information
fabioassuncao committed May 31, 2023
2 parents 9ac055e + 5633691 commit f868a93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function getNamespace(string $path = null): string
return "Themes\\$vendor\\$name\\" . $path;
}

public function getInstance(string $path)
public function getInstance(string $path, ...$params)
{
if (! $this->enabled()) {
$this->requireClass($path);
Expand All @@ -221,7 +221,7 @@ public function getInstance(string $path)
throw new Exception("Class not found: {$class}");
}

return new $class;
return new $class(...$params);
}

/**
Expand Down

0 comments on commit f868a93

Please sign in to comment.