class PluginInstaller extends LibraryInstaller (View source)

Installer for plugin packages

Properties

protected $composer from LibraryInstaller
protected $vendorDir from LibraryInstaller
protected $binDir from LibraryInstaller
protected $downloadManager from LibraryInstaller
protected $io from LibraryInstaller
protected $type from LibraryInstaller
protected $filesystem from LibraryInstaller
protected $binCompat from LibraryInstaller
protected $binaryInstaller from LibraryInstaller

Methods

__construct(IOInterface $io, Composer $composer)

Initializes Plugin installer.

bool
supports(string $packageType)

Decides if the installer supports the given type

bool
isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)

Checks that provided package is installed.

install(InstalledRepositoryInterface $repo, PackageInterface $package)

Installs specific package.

update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)

Updates specific package.

uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)

Uninstalls specific package.

string
getInstallPath(PackageInterface $package)

Returns the installation path of a package

ensureBinariesPresence(PackageInterface $package)

Make sure binaries are installed for a given package.

string
getPackageBasePath(PackageInterface $package)

Returns the base path of the package without target-dir path

installCode(PackageInterface $package)

No description

updateCode(PackageInterface $initial, PackageInterface $target)

No description

removeCode(PackageInterface $package)

No description

initializeVendorDir()

No description

Details

__construct(IOInterface $io, Composer $composer)

Initializes Plugin installer.

Parameters

IOInterface $io
Composer $composer

bool supports(string $packageType)

Decides if the installer supports the given type

Parameters

string $packageType

Return Value

bool

bool isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)

Checks that provided package is installed.

Parameters

InstalledRepositoryInterface $repo repository in which to check
PackageInterface $package package instance

Return Value

bool

install(InstalledRepositoryInterface $repo, PackageInterface $package)

Installs specific package.

Parameters

InstalledRepositoryInterface $repo repository in which to check
PackageInterface $package package instance

update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)

Updates specific package.

Parameters

InstalledRepositoryInterface $repo repository in which to check
PackageInterface $initial already installed package version
PackageInterface $target updated version

Exceptions

InvalidArgumentException if $initial package is not installed

uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)

Uninstalls specific package.

Parameters

InstalledRepositoryInterface $repo repository in which to check
PackageInterface $package package instance

string getInstallPath(PackageInterface $package)

Returns the installation path of a package

Parameters

PackageInterface $package

Return Value

string path

ensureBinariesPresence(PackageInterface $package)

Make sure binaries are installed for a given package.

Parameters

PackageInterface $package package instance

protected string getPackageBasePath(PackageInterface $package)

Returns the base path of the package without target-dir path

It is used for BC as getInstallPath tends to be overridden by installer plugins but not getPackageBasePath

Parameters

PackageInterface $package

Return Value

string

protected installCode(PackageInterface $package)

Parameters

PackageInterface $package

protected updateCode(PackageInterface $initial, PackageInterface $target)

Parameters

PackageInterface $initial
PackageInterface $target

protected removeCode(PackageInterface $package)

Parameters

PackageInterface $package

protected initializeVendorDir()