LEtudiant\Composer\Installer\SharedPackageInstaller::install PHP Method

install() public method

public install ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $package )
$repo Composer\Repository\InstalledRepositoryInterface
$package Composer\Package\PackageInterface
    public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
    {
        if (!is_readable($this->getInstallPath($package))) {
            parent::install($repo, $package);
        } elseif (!$repo->hasPackage($package)) {
            $this->binaryInstaller->installBinaries($package, $this->getInstallPath($package));
            $repo->addPackage(clone $package);
        }
        $this->createPackageVendorSymlink($package);
        $this->packageDataManager->addPackageUsage($package);
    }

Usage Example

 /**
  * @param InstalledRepositoryInterface $repo
  * @param PackageInterface             $package
  */
 public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
 {
     if ($package->isDev()) {
         $this->symlinkInstaller->install($repo, $package);
     } else {
         $this->defaultInstaller->install($repo, $package);
     }
 }
All Usage Examples Of LEtudiant\Composer\Installer\SharedPackageInstaller::install