class ProjectInstaller implements InstallerInterface (View source)

Project Installer is used to install a single package into a directory as root project.

Methods

__construct($installPath, DownloadManager $dm)

No description

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

Details

__construct($installPath, DownloadManager $dm)

Parameters

$installPath
DownloadManager $dm

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