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