class RootPackageLoader extends ArrayLoader (View source)

ArrayLoader built for the sole purpose of loading the root package

Sets additional defaults and loads repositories

Properties

protected $versionParser from ArrayLoader
protected $loadOptions from ArrayLoader

Methods

__construct(RepositoryManager $manager, Config $config, VersionParser $parser = null, VersionGuesser $versionGuesser = null)

No description

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

No description

Link[]
parseLinks(string $source, string $sourceVersion, string $description, array $links)

No description

string|null
getBranchAlias(array $config)

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

Details

__construct(RepositoryManager $manager, Config $config, VersionParser $parser = null, VersionGuesser $versionGuesser = null)

Parameters

RepositoryManager $manager
Config $config
VersionParser $parser
VersionGuesser $versionGuesser

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

Parameters

array $config
string $class Package class to use
string $cwd cwd of the root package to be used to guess the version if it is not provided

Return Value

PackageInterface

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

Return Value

Link[]

string|null getBranchAlias(array $config)

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

Parameters

array $config the entire package config

Return Value

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