class ArrayLoader implements LoaderInterface (View source)

Properties

protected $versionParser
protected $loadOptions

Methods

__construct(VersionParser $parser = null, $loadOptions = false)

No description

load(array $config, string $class = 'Composer\\Package\\CompletePackage')

Converts a package from an array to a real instance

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(VersionParser $parser = null, $loadOptions = false)

Parameters

VersionParser $parser
$loadOptions

PackageInterface load(array $config, string $class = 'Composer\\Package\\CompletePackage')

Converts a package from an array to a real instance

Parameters

array $config
string $class Package class to use

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