PHP Class PHPComposter\PHPComposter\Installer

The Installer class tells Composer where to install each package of type php-composter-action.
Since: 0.1.0
Author: Alain Schlesser ([email protected])
Inheritance: extends Composer\Installer\LibraryInstaller
Show file Open project: php-composter/php-composter

Public Methods

Method Description
getInstallPath ( Composer\Package\PackageInterface $package ) : string Get the installation path of the package.
install ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $package ) Install the package.
isInstalled ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $package ) : boolean Check whether the package is already installed.
supports ( $packageType ) : boolean Whether the installer supports a given package type.

Protected Methods

Method Description
getHooks ( Composer\Package\PackageInterface $package ) : array Get the hooks configuration from package extra data.
getSuffix ( Composer\Package\PackageInterface $package ) : string Get the package name suffix.

Method Details

getHooks() protected method

Get the hooks configuration from package extra data.
Since: 0.2.0
protected getHooks ( Composer\Package\PackageInterface $package ) : array
$package Composer\Package\PackageInterface Package to inspect.
return array Array of prioritized hooks.

getInstallPath() public method

Get the installation path of the package.
Since: 0.1.0
public getInstallPath ( Composer\Package\PackageInterface $package ) : string
$package Composer\Package\PackageInterface The package to install.
return string Relative installation path.

getSuffix() protected method

Get the package name suffix.
Since: 0.1.0
protected getSuffix ( Composer\Package\PackageInterface $package ) : string
$package Composer\Package\PackageInterface Package to inspect.
return string Suffix of the package name.

install() public method

Install the package.
Since: 0.1.0
public install ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $package )
$repo Composer\Repository\InstalledRepositoryInterface The repository from where the package was fetched.
$package Composer\Package\PackageInterface The package to install.

isInstalled() public method

Check whether the package is already installed.
Since: 0.1.0
public isInstalled ( Composer\Repository\InstalledRepositoryInterface $repo, Composer\Package\PackageInterface $package ) : boolean
$repo Composer\Repository\InstalledRepositoryInterface
$package Composer\Package\PackageInterface
return boolean

supports() public method

Whether the installer supports a given package type.
Since: 0.1.0
public supports ( $packageType ) : boolean
$packageType
return boolean