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