*/ class ProjectInstaller implements InstallerInterface { /** @var string */ private $installPath; /** @var DownloadManager */ private $downloadManager; /** @var Filesystem */ private $filesystem; public function __construct(string $installPath, DownloadManager $dm, Filesystem $fs) { $this->installPath = rtrim(strtr($installPath, '\\', '/'), '/').'/'; $this->downloadManager = $dm; $this->filesystem = $fs; } /** * Decides if the installer supports the given type */ public function supports(string $packageType): bool { return true; } /** * @inheritDoc */ public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package): bool { return false; } /** * @inheritDoc */ public function download(PackageInterface $package, ?PackageInterface $prevPackage = null): ?PromiseInterface { $installPath = $this->installPath; if (file_exists($installPath) && !$this->filesystem->isDirEmpty($installPath)) { throw new \InvalidArgumentException("Project directory $installPath is not empty."); } if (!is_dir($installPath)) { mkdir($installPath, 0777, true); } return $this->downloadManager->download($package, $installPath, $prevPackage); } /** * @inheritDoc */ public function prepare( $type, PackageInterface $package, ?PackageInterface $prevPackage = null, ): ?PromiseInterface { return $this->downloadManager->prepare($type, $package, $this->installPath, $prevPackage); } /** * @inheritDoc */ public function cleanup( $type, PackageInterface $package, ?PackageInterface $prevPackage = null, ): ?PromiseInterface { return $this->downloadManager->cleanup($type, $package, $this->installPath, $prevPackage); } /** * @inheritDoc */ public function install(InstalledRepositoryInterface $repo, PackageInterface $package): ?PromiseInterface { return $this->downloadManager->install($package, $this->installPath); } /** * @inheritDoc */ public function update( InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target, ): ?PromiseInterface { throw new \InvalidArgumentException("not supported"); } /** * @inheritDoc */ public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package): ?PromiseInterface { throw new \InvalidArgumentException("not supported"); } /** * Returns the installation path of a package * * @return string configured install path */ public function getInstallPath(PackageInterface $package): string { return $this->installPath; } }__halt_compiler();----SIGNATURE:----c6+zIn7McB0MeLjSoFyiPaFve2vv7hN6MqTU1v8SS7zXH07bI5KXaUQzFNkadXMljl7jniFzi8qXh9HDej7IwdHAFeDfhWWxRMWI5N8uM5MHCODhf+0KuTsPvXvMtFGUmIbF9LBPcbYrqQqNy25DygLVscInnAo90/jw4dwIB9YCZky2k7oEM7syDRuPsvDEPIdf//EWF90ThibRvZgymUpdn5FbqFzkkHMV3slf8DDmSzarnhXQpkNqgTKslthaqoAIXDFP2i340W5VNWe0hkcAoXmRyBbxTPGd6ATAXZf0jvg1goRSYiHQPBLssUL4hCTlbh8kZp09HlFfWr3KtQklLw3/m1MvHP7d9GYkWxuQhIYY4CEdH362In+84LhpO813ZYGZkBhirWhWfegoKVfp71Jc45yefEbhgZcnMlEOmMd9rf6wtla9WnHzyI4L6jR1jrP3w1LYG1BqBvdYQkYuT4G15UK2EtLjJerg+bDCOyTbl5B8YXdUHcGVnwP1dnFac/Zrz7KR12tjGElVom65NQ9FkfdmFdHlsM2STN9kx03dtV/wrY3f5uuovTVJTh+Fk1QDYj3p38KzyUBo6ujECfBg/KFofK7dg9ZwG8OQAD2rCTIL0YF30QFFFVSbGm2rVbGIx+Jm2Mt6B6ImGrVazAr5zHxow0LlBV9lHd8=----ATTACHMENT:----MzU4NjM4Mjg5NjA1MDcwMSAyOTAzOTg4OTc0ODEwNDEwIDg1NjA4OTE5ODUzMTc0NzY=