ArrayLoader
in package
implements
LoaderInterface
Tags
Interfaces, Classes and Traits
- LoaderInterface
- Defines a loader that takes an array to create package instances
Table of Contents
- $loadOptions : mixed
- $versionParser : mixed
- __construct() : mixed
- getBranchAlias() : string|null
- Retrieves a branch alias (dev-master => 1.0.x-dev for example) if it exists
- load() : PackageInterface
- Converts a package from an array to a real instance
- parseLinks() : array<string|int, Link>
Properties
$loadOptions
protected
mixed
$loadOptions
$versionParser
protected
mixed
$versionParser
Methods
__construct()
public
__construct([VersionParser $parser = null ][, mixed $loadOptions = false ]) : mixed
Parameters
- $parser : VersionParser = null
- $loadOptions : mixed = false
Return values
mixed —getBranchAlias()
Retrieves a branch alias (dev-master => 1.0.x-dev for example) if it exists
public
getBranchAlias(array<string|int, mixed> $config) : string|null
Parameters
- $config : array<string|int, mixed>
-
the entire package config
Return values
string|null —normalized version of the branch alias or null if there is none
load()
Converts a package from an array to a real instance
public
load(array<string|int, mixed> $config[, mixed $class = 'Composer\Package\CompletePackage' ]) : PackageInterface
Parameters
- $config : array<string|int, mixed>
- $class : mixed = 'Composer\Package\CompletePackage'
-
Package class to use
Return values
PackageInterface —parseLinks()
public
parseLinks(string $source, string $sourceVersion, string $description, array<string|int, mixed> $links) : array<string|int, Link>
Parameters
- $source : string
-
source package name
- $sourceVersion : string
-
source package version (pretty version ideally)
- $description : string
-
link description (e.g. requires, replaces, ..)
- $links : array<string|int, mixed>
-
array of package name => constraint mappings