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