Composer API
Class

Composer\Package\Loader\RootPackageLoader

class RootPackageLoader extends ArrayLoader

ArrayLoader built for the sole purpose of loading the root package

Sets additional defaults and loads repositories

Methods

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

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

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

from ArrayLoader
string|null getBranchAlias(array $config)

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

from ArrayLoader

Details

at line 49
public __construct(RepositoryManager $manager, Config $config, VersionParser $parser = null, VersionGuesser $versionGuesser = null)

Parameters

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

at line 64
public RootPackageInterface load(array $config, string $class = 'Composer\\Package\\RootPackage', string $cwd = null)

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

Return Value

RootPackageInterface

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[]

in ArrayLoader at line 256
public 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