@@ 694-710 (lines=17) @@ | ||
691 | * |
|
692 | * @return RepositoryManager The repository manager. |
|
693 | */ |
|
694 | public function getRepositoryManager() |
|
695 | { |
|
696 | if (!$this->started) { |
|
697 | throw new LogicException('Puli was not started'); |
|
698 | } |
|
699 | ||
700 | if (!$this->repositoryManager && $this->context instanceof ProjectContext) { |
|
701 | $this->repositoryManager = new RepositoryManagerImpl( |
|
702 | $this->context, |
|
703 | $this->getRepository(), |
|
704 | $this->getModuleManager()->findModules(Expr::method('isEnabled', Expr::same(true))), |
|
705 | $this->getModuleFileStorage() |
|
706 | ); |
|
707 | } |
|
708 | ||
709 | return $this->repositoryManager; |
|
710 | } |
|
711 | ||
712 | /** |
|
713 | * Returns the resource discovery manager. |
|
@@ 717-734 (lines=18) @@ | ||
714 | * |
|
715 | * @return DiscoveryManager The discovery manager. |
|
716 | */ |
|
717 | public function getDiscoveryManager() |
|
718 | { |
|
719 | if (!$this->started) { |
|
720 | throw new LogicException('Puli was not started'); |
|
721 | } |
|
722 | ||
723 | if (!$this->discoveryManager && $this->context instanceof ProjectContext) { |
|
724 | $this->discoveryManager = new DiscoveryManagerImpl( |
|
725 | $this->context, |
|
726 | $this->getDiscovery(), |
|
727 | $this->getModuleManager()->findModules(Expr::method('isEnabled', Expr::same(true))), |
|
728 | $this->getModuleFileStorage(), |
|
729 | $this->logger |
|
730 | ); |
|
731 | } |
|
732 | ||
733 | return $this->discoveryManager; |
|
734 | } |
|
735 | ||
736 | /** |
|
737 | * Returns the asset manager. |