ComposerHelper
in package
Table of Contents
- $composerLockPath : string
- $lockPackagesSections : array<string|int, mixed>
- $namespaceMap : array<string|int, mixed>
- __construct() : mixed
- getInfo() : array<string|int, mixed>|false
- Get info for a namespace.
- parseComposerLock() : void
- Parse the `composer.lock` file to map namespaces to package names.
- getPackageInfo() : false|array<string|int, mixed>
- Try to get info for a namespace.
- parseAutoload() : array<string|int, mixed>
- Return an array of namespace to package mappings for a package.
- parseComposerLockSection() : void
- Parse a `composer.lock` section to map namespaces to package names.
Properties
$composerLockPath
protected
string
$composerLockPath
$lockPackagesSections
protected
array<string|int, mixed>
$lockPackagesSections
= ['packages', 'packages-dev']
$namespaceMap
protected
array<string|int, mixed>
$namespaceMap
Methods
__construct()
public
__construct([string $composerLockPath = '' ]) : mixed
Parameters
- $composerLockPath : string = ''
Tags
Return values
mixed —getInfo()
Get info for a namespace.
public
getInfo(string $namespace) : array<string|int, mixed>|false
Parameters
- $namespace : string
Return values
array<string|int, mixed>|false —parseComposerLock()
Parse the `composer.lock` file to map namespaces to package names.
public
parseComposerLock([string $composerLockPath = '' ]) : void
Parameters
- $composerLockPath : string = ''
Tags
Return values
void —getPackageInfo()
Try to get info for a namespace.
protected
getPackageInfo(string $namespace) : false|array<string|int, mixed>
Parameters
- $namespace : string
Return values
false|array<string|int, mixed> —parseAutoload()
Return an array of namespace to package mappings for a package.
protected
parseAutoload(array<string|int, mixed> $autoload) : array<string|int, mixed>
Parameters
- $autoload : array<string|int, mixed>
Return values
array<string|int, mixed> —parseComposerLockSection()
Parse a `composer.lock` section to map namespaces to package names.
protected
parseComposerLockSection(array<string|int, mixed> $lockArray, string $lockPackagesSection) : void
Parameters
- $lockArray : array<string|int, mixed>
- $lockPackagesSection : string