class DependencyChecker (View source)

Properties

protected Application $application
protected Package[]|null $installedPackages

Methods

__construct(Application $application)

Initializes the instance.

$this
setInstalledPackages(array $installedPackages)

Set the list of installed packages.

testForInstall(Package $package)

No description

testForUninstall(Package $package)

No description

getInstalledPackages()

Get the list of installed packages.

string[]|string|bool|null
getPackageRequirementsForPackage(Package $package, Package $otherPackage)

Get the requirements for a package in respect to another package.

checkPackageCompatibility(Package $package, Package $dependentPackage, string[]|string|bool|null $requirements)

No description

Details

__construct(Application $application)

Initializes the instance.

Parameters

Application $application

$this setInstalledPackages(array $installedPackages)

Set the list of installed packages.

Parameters

array $installedPackages

Return Value

$this

ErrorList testForInstall(Package $package)

No description

Parameters

Package $package

Return Value

ErrorList

ErrorList testForUninstall(Package $package)

No description

Parameters

Package $package

Return Value

ErrorList

protected Package[] getInstalledPackages()

Get the list of installed packages.

Return Value

Package[]

keys are package handles, values are Package instances

protected string[]|string|bool|null getPackageRequirementsForPackage(Package $package, Package $otherPackage)

Get the requirements for a package in respect to another package.

Parameters

Package $package
Package $otherPackage

Return Value

string[]|string|bool|null

protected LogicException|null checkPackageCompatibility(Package $package, Package $dependentPackage, string[]|string|bool|null $requirements)

No description

Parameters

Package $package
Package $dependentPackage
string[]|string|bool|null $requirements

Return Value

LogicException|null