Composer API
Class

Composer\Installer\PearInstaller

class PearInstaller extends LibraryInstaller

Package installation manager.

Methods

__construct(IOInterface $io, Composer $composer, string $type = 'pear-library')

Initializes library installer.

bool supports(string $packageType)

Decides if the installer supports the given type

from LibraryInstaller
bool isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)

Checks that provided package is installed.

from LibraryInstaller
install(InstalledRepositoryInterface $repo, PackageInterface $package)

Installs specific package.

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

Updates specific package.

uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)

Uninstalls specific package.

from LibraryInstaller
string getInstallPath(PackageInterface $package)

Returns the installation path of a package

from LibraryInstaller

Details

at line 38
public __construct(IOInterface $io, Composer $composer, string $type = 'pear-library')

Initializes library installer.

Parameters

IOInterface $io io instance
Composer $composer
string $type package type that this installer handles

in LibraryInstaller at line 64
public bool supports(string $packageType)

Decides if the installer supports the given type

Parameters

string $packageType

Return Value

bool

in LibraryInstaller at line 72
public 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

in LibraryInstaller at line 80
public install(InstalledRepositoryInterface $repo, PackageInterface $package)

Installs specific package.

Parameters

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

at line 49
public 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

in LibraryInstaller at line 120
public uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)

Uninstalls specific package.

Parameters

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

in LibraryInstaller at line 142
public string getInstallPath(PackageInterface $package)

Returns the installation path of a package

Parameters

PackageInterface $package

Return Value

string path