Skip to content

Commit

Permalink
Merge pull request #7 from bearsunday/spike
Browse files Browse the repository at this point in the history
Bind RounterContainer in singleton
  • Loading branch information
koriym authored Feb 21, 2018
2 parents 6740af4 + 9325744 commit 0f711d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Provide/Router/AuraRouterModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct($routerFile = null, AbstractModule $module = null)

protected function configure()
{
$this->bind(RouterContainer::class);
$this->bind(RouterContainer::class)->in(Scope::SINGLETON);
$this->bind()->annotatedWith('aura_router_file')->toInstance($this->routerFile);
$this->bind(Map::class)->annotatedWith('aura_map')->to(Map::class);
$this->bind(Map::class)->in(Scope::SINGLETON);
Expand Down
4 changes: 2 additions & 2 deletions src/Provide/Router/AuraRouterProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ class AuraRouterProvider implements ProviderInterface
/**
* @DefaultSchemeHost("schemeHost")
*/
public function __construct(AbstractAppMeta $appMeta, $schemeHost)
public function __construct(AbstractAppMeta $appMeta, $schemeHost, RouterContainer $routerContainer)
{
$this->schemeHost = $schemeHost;
$this->appMeta = $appMeta;
$this->routerContainer = new RouterContainer;
$this->routerContainer = $routerContainer;
}

/**
Expand Down

0 comments on commit 0f711d5

Please sign in to comment.