PHP Class LEtudiant\Composer\Data\Package\SharedPackageDataManager

Author: Sylvain Lorinet ([email protected])
Inheritance: implements LEtudiant\Composer\Data\Package\PackageDataManagerInterface
ファイルを表示 Open project: letudiant/composer-shared-package-plugin Class Usage Examples

Protected Properties

Property Type Description
$composer Composer\Composer
$packagesData array
$vendorDir string

Public Methods

Method Description
__construct ( Composer\Composer $composer )
addPackageUsage ( Composer\Package\PackageInterface $package ) Add a row in the "packages.json" file, with the project name for the "package/version" key
getPackageUsage ( Composer\Package\PackageInterface $package ) : array Return usage of the current package
removePackageUsage ( Composer\Package\PackageInterface $package ) Remove the row in the "packages.json" file
setPackageInstallationSource ( Composer\Package\PackageInterface $package )
setVendorDir ( string $vendorDir )

Protected Methods

Method Description
getPackageDataKey ( Composer\Package\PackageInterface $package, string $key, mixed $defaultValue = null ) : mixed
getPackageInstallationSource ( Composer\Package\PackageInterface $package ) : string | null
initializePackageData ( ) Initialize the package data array if not set
updatePackageUsageFile ( Composer\Package\PackageInterface $package, array $packageData )

Method Details

__construct() public method

public __construct ( Composer\Composer $composer )
$composer Composer\Composer

addPackageUsage() public method

Add a row in the "packages.json" file, with the project name for the "package/version" key
public addPackageUsage ( Composer\Package\PackageInterface $package )
$package Composer\Package\PackageInterface

getPackageDataKey() protected method

protected getPackageDataKey ( Composer\Package\PackageInterface $package, string $key, mixed $defaultValue = null ) : mixed
$package Composer\Package\PackageInterface
$key string
$defaultValue mixed
return mixed

getPackageInstallationSource() protected method

protected getPackageInstallationSource ( Composer\Package\PackageInterface $package ) : string | null
$package Composer\Package\PackageInterface
return string | null

getPackageUsage() public method

Return usage of the current package
public getPackageUsage ( Composer\Package\PackageInterface $package ) : array
$package Composer\Package\PackageInterface
return array

initializePackageData() protected method

Initialize the package data array if not set
protected initializePackageData ( )

removePackageUsage() public method

Remove the row in the "packages.json" file
public removePackageUsage ( Composer\Package\PackageInterface $package )
$package Composer\Package\PackageInterface

setPackageInstallationSource() public method

public setPackageInstallationSource ( Composer\Package\PackageInterface $package )
$package Composer\Package\PackageInterface

setVendorDir() public method

public setVendorDir ( string $vendorDir )
$vendorDir string

updatePackageUsageFile() protected method

protected updatePackageUsageFile ( Composer\Package\PackageInterface $package, array $packageData )
$package Composer\Package\PackageInterface
$packageData array

Property Details

$composer protected_oe property

protected Composer,Composer $composer
return Composer\Composer

$packagesData protected_oe property

protected array $packagesData
return array

$vendorDir protected_oe property

protected string $vendorDir
return string