| @@ 652-666 (lines=15) @@ | ||
| 649 | * |
|
| 650 | * @return RootModuleFileManager The module file manager. |
|
| 651 | */ |
|
| 652 | public function getRootModuleFileManager() |
|
| 653 | { |
|
| 654 | if (!$this->started) { |
|
| 655 | throw new LogicException('Puli was not started'); |
|
| 656 | } |
|
| 657 | ||
| 658 | if (!$this->rootModuleFileManager && $this->context instanceof ProjectContext) { |
|
| 659 | $this->rootModuleFileManager = new RootModuleFileManagerImpl( |
|
| 660 | $this->context, |
|
| 661 | $this->getModuleFileStorage() |
|
| 662 | ); |
|
| 663 | } |
|
| 664 | ||
| 665 | return $this->rootModuleFileManager; |
|
| 666 | } |
|
| 667 | ||
| 668 | /** |
|
| 669 | * Returns the module manager. |
|
| @@ 673-687 (lines=15) @@ | ||
| 670 | * |
|
| 671 | * @return ModuleManager The module manager. |
|
| 672 | */ |
|
| 673 | public function getModuleManager() |
|
| 674 | { |
|
| 675 | if (!$this->started) { |
|
| 676 | throw new LogicException('Puli was not started'); |
|
| 677 | } |
|
| 678 | ||
| 679 | if (!$this->moduleManager && $this->context instanceof ProjectContext) { |
|
| 680 | $this->moduleManager = new ModuleManagerImpl( |
|
| 681 | $this->context, |
|
| 682 | $this->getModuleFileStorage() |
|
| 683 | ); |
|
| 684 | } |
|
| 685 | ||
| 686 | return $this->moduleManager; |
|
| 687 | } |
|
| 688 | ||
| 689 | /** |
|
| 690 | * Returns the resource repository manager. |
|