PHP Class Monorepo\Composer\MonorepoInstaller

Inheritance: implements Composer\Installer\InstallerInterface
Show file Open project: beberlei/composer-monorepo-plugin

Public Methods

Method Description
getInstallPath ( Composer\Package\PackageInterface $package ) : string Returns the installation path of a package
install ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $package ) Installs specific package.
isInstalled ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $package ) : boolean Checks that provided package is installed.
supports ( string $packageType ) : boolean Decides if the installer supports the given type
uninstall ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $package ) Uninstalls specific package.
update ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $initial, Composer\Package\PackageInterface $target ) Updates specific package.

Method Details

getInstallPath() public method

Returns the installation path of a package
public getInstallPath ( Composer\Package\PackageInterface $package ) : string
$package Composer\Package\PackageInterface
return string path

install() public method

Installs specific package.
public install ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $package )
$repo Composer\Repository\InstalledRepositoryInterface repository in which to check
$package Composer\Package\PackageInterface package instance

isInstalled() public method

Checks that provided package is installed.
public isInstalled ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $package ) : boolean
$repo Composer\Repository\InstalledRepositoryInterface repository in which to check
$package Composer\Package\PackageInterface package instance
return boolean

supports() public method

Decides if the installer supports the given type
public supports ( string $packageType ) : boolean
$packageType string
return boolean

uninstall() public method

Uninstalls specific package.
public uninstall ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $package )
$repo Composer\Repository\InstalledRepositoryInterface repository in which to check
$package Composer\Package\PackageInterface package instance

update() public method

Updates specific package.
public update ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $initial, Composer\Package\PackageInterface $target )
$repo Composer\Repository\InstalledRepositoryInterface repository in which to check
$initial Composer\Package\PackageInterface already installed package version
$target Composer\Package\PackageInterface updated version