@@ 712-728 (lines=17) @@ | ||
709 | * |
|
710 | * @return RepositoryManager The repository manager. |
|
711 | */ |
|
712 | public function getRepositoryManager() |
|
713 | { |
|
714 | if (!$this->started) { |
|
715 | throw new LogicException('Puli was not started'); |
|
716 | } |
|
717 | ||
718 | if (!$this->repositoryManager && $this->context instanceof ProjectContext) { |
|
719 | $this->repositoryManager = new RepositoryManagerImpl( |
|
720 | $this->context, |
|
721 | $this->getRepository(), |
|
722 | $this->getModuleManager()->findModules(Expr::method('isEnabled', Expr::same(true))), |
|
723 | $this->getJsonStorage() |
|
724 | ); |
|
725 | } |
|
726 | ||
727 | return $this->repositoryManager; |
|
728 | } |
|
729 | ||
730 | /** |
|
731 | * Returns the resource discovery manager. |
|
@@ 735-752 (lines=18) @@ | ||
732 | * |
|
733 | * @return DiscoveryManager The discovery manager. |
|
734 | */ |
|
735 | public function getDiscoveryManager() |
|
736 | { |
|
737 | if (!$this->started) { |
|
738 | throw new LogicException('Puli was not started'); |
|
739 | } |
|
740 | ||
741 | if (!$this->discoveryManager && $this->context instanceof ProjectContext) { |
|
742 | $this->discoveryManager = new DiscoveryManagerImpl( |
|
743 | $this->context, |
|
744 | $this->getDiscovery(), |
|
745 | $this->getModuleManager()->findModules(Expr::method('isEnabled', Expr::same(true))), |
|
746 | $this->getJsonStorage(), |
|
747 | $this->logger |
|
748 | ); |
|
749 | } |
|
750 | ||
751 | return $this->discoveryManager; |
|
752 | } |
|
753 | ||
754 | /** |
|
755 | * Returns the asset manager. |