Skip to main content

Module loader

Module loader 

Source
Expand description

Port of Composer\Package\Loader\ArrayLoader (docs/reference/resolver/ ArrayLoader.php) restricted to the model’s fields, and of MetadataMinifier::expand. A JSON entry (p2 version or lock entry) becomes a Package, plus its branch alias if any.

Structs§

LoadError

Functions§

branch_alias
ArrayLoader::getBranchAlias($config) -> normalized alias.
expand_minified
MetadataMinifier::expand.
expand_minified_owned
expand consuming the input (one copy fewer per version).
load
ArrayLoader::load($config) (batch = false) or one iteration of ArrayLoader::loadPackages (batch = true): the package, and its alias if any (to be added right before it, like ArrayRepository::addPackage).
load_packages
ArrayLoader::loadPackages (batch) or repeated load(), followed by the addition to a repository: load() returns the AliasPackage when there is one, and the repository adds the alias THEN the aliased package (ArrayRepository::addPackage, loadAsyncPackages). The returned order is therefore [alias, base]; the arena keeps base before alias.
pretty_alias
preg_replace('{(\.9{7})+}', '.x', $alias).