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

isInstalled() public method

public isInstalled ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $package ) : boolean
$repo Composer\Repository\InstalledRepositoryInterface
$package Composer\Package\PackageInterface
return boolean
    public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
    {
        // Just check if the sources folder and the link exist
        return $repo->hasPackage($package) && is_readable($this->getInstallPath($package)) && is_link($this->getPackageVendorSymlink($package));
    }

Usage Example

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