| @@ 603-617 (lines=15) @@ | ||
| 600 | * |
|
| 601 | * @return RootPackageFileManager The package file manager. |
|
| 602 | */ |
|
| 603 | public function getRootPackageFileManager() |
|
| 604 | { |
|
| 605 | if (!$this->started) { |
|
| 606 | throw new LogicException('Puli was not started'); |
|
| 607 | } |
|
| 608 | ||
| 609 | if (!$this->rootPackageFileManager && $this->context instanceof ProjectContext) { |
|
| 610 | $this->rootPackageFileManager = new RootPackageFileManagerImpl( |
|
| 611 | $this->context, |
|
| 612 | $this->getPackageFileStorage() |
|
| 613 | ); |
|
| 614 | } |
|
| 615 | ||
| 616 | return $this->rootPackageFileManager; |
|
| 617 | } |
|
| 618 | ||
| 619 | /** |
|
| 620 | * Returns the package manager. |
|
| @@ 624-638 (lines=15) @@ | ||
| 621 | * |
|
| 622 | * @return PackageManager The package manager. |
|
| 623 | */ |
|
| 624 | public function getPackageManager() |
|
| 625 | { |
|
| 626 | if (!$this->started) { |
|
| 627 | throw new LogicException('Puli was not started'); |
|
| 628 | } |
|
| 629 | ||
| 630 | if (!$this->packageManager && $this->context instanceof ProjectContext) { |
|
| 631 | $this->packageManager = new PackageManagerImpl( |
|
| 632 | $this->context, |
|
| 633 | $this->getPackageFileStorage() |
|
| 634 | ); |
|
| 635 | } |
|
| 636 | ||
| 637 | return $this->packageManager; |
|
| 638 | } |
|
| 639 | ||
| 640 | /** |
|
| 641 | * Returns the resource repository manager. |
|