LibraryInstaller
in package
implements
InstallerInterface, BinaryPresenceInterface
Package installation manager.
Tags
Interfaces, Classes and Traits
- InstallerInterface
- Interface for the package installation manager.
- BinaryPresenceInterface
- Interface for the package installation manager that handle binary installation.
Table of Contents
- $binaryInstaller : mixed
- $binCompat : mixed
- $binDir : mixed
- $composer : mixed
- $downloadManager : mixed
- $filesystem : mixed
- $io : mixed
- $type : mixed
- $vendorDir : mixed
- __construct() : mixed
- Initializes library installer.
- ensureBinariesPresence() : mixed
- Make sure binaries are installed for a given package.
- getInstallPath() : string
- Returns the installation path of a package
- install() : mixed
- Installs specific package.
- isInstalled() : bool
- Checks that provided package is installed.
- supports() : bool
- Decides if the installer supports the given type
- uninstall() : mixed
- Uninstalls specific package.
- update() : mixed
- Updates specific package.
- getPackageBasePath() : string
- Returns the base path of the package without target-dir path
- initializeVendorDir() : mixed
- installCode() : mixed
- removeCode() : mixed
- updateCode() : mixed
Properties
$binaryInstaller
protected
mixed
$binaryInstaller
$binCompat
protected
mixed
$binCompat
$binDir
protected
mixed
$binDir
$composer
protected
mixed
$composer
$downloadManager
protected
mixed
$downloadManager
$filesystem
protected
mixed
$filesystem
$io
protected
mixed
$io
$type
protected
mixed
$type
$vendorDir
protected
mixed
$vendorDir
Methods
__construct()
Initializes library installer.
public
__construct(IOInterface $io, Composer $composer[, string $type = 'library' ][, Filesystem $filesystem = null ][, BinaryInstaller $binaryInstaller = null ]) : mixed
Parameters
- $io : IOInterface
- $composer : Composer
- $type : string = 'library'
- $filesystem : Filesystem = null
- $binaryInstaller : BinaryInstaller = null
Return values
mixed —ensureBinariesPresence()
Make sure binaries are installed for a given package.
public
ensureBinariesPresence(PackageInterface $package) : mixed
Parameters
- $package : PackageInterface
-
Package instance
Return values
mixed —getInstallPath()
Returns the installation path of a package
public
getInstallPath(PackageInterface $package) : string
Parameters
- $package : PackageInterface
Return values
string —path
install()
Installs specific package.
public
install(InstalledRepositoryInterface $repo, PackageInterface $package) : mixed
Parameters
- $repo : InstalledRepositoryInterface
-
repository in which to check
- $package : PackageInterface
-
package instance
Return values
mixed —isInstalled()
Checks that provided package is installed.
public
isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) : bool
Parameters
- $repo : InstalledRepositoryInterface
-
repository in which to check
- $package : PackageInterface
-
package instance
Return values
bool —supports()
Decides if the installer supports the given type
public
supports(mixed $packageType) : bool
Parameters
- $packageType : mixed
Return values
bool —uninstall()
Uninstalls specific package.
public
uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) : mixed
Parameters
- $repo : InstalledRepositoryInterface
-
repository in which to check
- $package : PackageInterface
-
package instance
Return values
mixed —update()
Updates specific package.
public
update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) : mixed
Parameters
- $repo : InstalledRepositoryInterface
-
repository in which to check
- $initial : PackageInterface
-
already installed package version
- $target : PackageInterface
-
updated version
Return values
mixed —getPackageBasePath()
Returns the base path of the package without target-dir path
protected
getPackageBasePath(PackageInterface $package) : string
It is used for BC as getInstallPath tends to be overridden by installer plugins but not getPackageBasePath
Parameters
- $package : PackageInterface
Return values
string —initializeVendorDir()
protected
initializeVendorDir() : mixed
Return values
mixed —installCode()
protected
installCode(PackageInterface $package) : mixed
Parameters
- $package : PackageInterface
Return values
mixed —removeCode()
protected
removeCode(PackageInterface $package) : mixed
Parameters
- $package : PackageInterface
Return values
mixed —updateCode()
protected
updateCode(PackageInterface $initial, PackageInterface $target) : mixed
Parameters
- $initial : PackageInterface
- $target : PackageInterface