\Composer\Package\LoaderRootPackageLoader

ArrayLoader built for the sole purpose of loading the root package

Sets additional defaults and loads repositories

Summary

Methods
Properties
Constants
__construct()
load()
parseLinks()
getBranchAlias()
No public properties found
No constants found
No protected methods found
$versionParser
$loadOptions
N/A
extractAliases()
extractStabilityFlags()
extractReferences()
$manager
$config
$versionGuesser
N/A

Properties

$versionParser

$versionParser : 

Type

$loadOptions

$loadOptions : 

Type

Methods

load()

load(array  $config, string  $class = 'Composer\Package\RootPackage', string  $cwd = null) : \Composer\Package\RootPackageInterface

Converts a package from an array to a real instance

Parameters

array $config

package data

string $class

FQCN to be instantiated

string $cwd

cwd of the root package to be used to guess the version if it is not provided

Returns

\Composer\Package\RootPackageInterface

parseLinks()

parseLinks(string  $source, string  $sourceVersion, string  $description, array  $links) : array<mixed,\Composer\Package\Link>

Parameters

string $source

source package name

string $sourceVersion

source package version (pretty version ideally)

string $description

link description (e.g. requires, replaces, ..)

array $links

array of package name => constraint mappings

Returns

array<mixed,\Composer\Package\Link>

getBranchAlias()

getBranchAlias(array  $config) : string|null

Retrieves a branch alias (dev-master => 1.0.x-dev for example) if it exists

Parameters

array $config

the entire package config

Returns

string|null —

normalized version of the branch alias or null if there is none

extractAliases()

extractAliases(array  $requires, array  $aliases) 

Parameters

array $requires
array $aliases

extractStabilityFlags()

extractStabilityFlags(array  $requires, array  $stabilityFlags,   $minimumStability) 

Parameters

array $requires
array $stabilityFlags
$minimumStability

extractReferences()

extractReferences(array  $requires, array  $references) 

Parameters

array $requires
array $references