PHP Class Neos\Flow\Package\PackageOrderResolver

Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$manifestData array
$packageStates array
$sortedPackages array
$unsortedPackages array The key is a package key, the value is "-1" if it is on stack for cycle detection; otherwise it is the number of times it was attempted to sort it already.

Méthodes publiques

Méthode Description
__construct ( array $packages, array $manifestData )
sort ( ) : array Sorts the packages and returns the sorted packages array

Méthodes protégées

Méthode Description
packageRequirementIsComposerPackage ( string $requirement ) : boolean Check whether the given package requirement (like "typo3/flow" or "php") is a composer package or not
sortListBefore ( string $packageKey, array $packagesToLoadBefore ) : integer Tries to sort packages from the given list before the named package key.
sortPackage ( string $packageKey ) : boolean Recursively sort dependencies of a package. This is a depth-first approach that recursively adds all dependent packages to the sorted list before adding the given package. Visited packages are flagged to break up cyclic dependencies.

Method Details

__construct() public méthode

public __construct ( array $packages, array $manifestData )
$packages array The array of package states to order by dependencies
$manifestData array The manifests of all given packages for reading dependencies

packageRequirementIsComposerPackage() protected méthode

Check whether the given package requirement (like "typo3/flow" or "php") is a composer package or not
protected packageRequirementIsComposerPackage ( string $requirement ) : boolean
$requirement string the composer requirement string
Résultat boolean TRUE if $requirement is a composer package (contains a slash), FALSE otherwise

sort() public méthode

Sorts the packages and returns the sorted packages array
public sort ( ) : array
Résultat array

sortListBefore() protected méthode

Ignores non existing packages and any composer key without "/" (eg. "php").
protected sortListBefore ( string $packageKey, array $packagesToLoadBefore ) : integer
$packageKey string
$packagesToLoadBefore array
Résultat integer

sortPackage() protected méthode

Recursively sort dependencies of a package. This is a depth-first approach that recursively adds all dependent packages to the sorted list before adding the given package. Visited packages are flagged to break up cyclic dependencies.
protected sortPackage ( string $packageKey ) : boolean
$packageKey string Package key to process
Résultat boolean true if package was sorted; false otherwise.

Property Details

$manifestData protected_oe property

protected array $manifestData
Résultat array

$packageStates protected_oe property

protected array $packageStates
Résultat array

$sortedPackages protected_oe property

protected array $sortedPackages
Résultat array

$unsortedPackages protected_oe property

The key is a package key, the value is "-1" if it is on stack for cycle detection; otherwise it is the number of times it was attempted to sort it already.
protected array $unsortedPackages
Résultat array