Documentation

ComposerManager
in package

Helps perform tasks with the composer configuration.

Table of Contents

$composer  : Composer|null
$cwd  : string
__construct()  : mixed
Construct a manager with an optional working directory where composer.json lives.
findAutoloader()  : string
Returns a path (could be relative) to the proper autoload.php file in the current setup.
getComposer()  : Composer
Returns a Composer instance to perform underlying operations on. Be careful.
getModulePackages()  : array<string|int, PackageInterface>
Return a list of the configured packages which are LotGD modules (type = 'lotgd-module').
getPackageForLibrary()  : CompletePackageInterface
Return the Composer package for the corresponding library, in vendor/module format.
getPackages()  : array<string|int, PackageInterface>
Return all the packages installed in the current setup.
translateNamespaceToPath()  : string|null
Find the filesystem path where the code for a namespace can be found.

Properties

Methods

__construct()

Construct a manager with an optional working directory where composer.json lives.

public __construct(string $cwd) : mixed
Parameters
$cwd : string
Return values
mixed

findAutoloader()

Returns a path (could be relative) to the proper autoload.php file in the current setup.

public findAutoloader() : string
Return values
string

getComposer()

Returns a Composer instance to perform underlying operations on. Be careful.

public getComposer() : Composer
Return values
Composer

An instance of Composer.

getModulePackages()

Return a list of the configured packages which are LotGD modules (type = 'lotgd-module').

public getModulePackages() : array<string|int, PackageInterface>
Return values
array<string|int, PackageInterface>

getPackageForLibrary()

Return the Composer package for the corresponding library, in vendor/module format.

public getPackageForLibrary(string $library) : CompletePackageInterface
Parameters
$library : string
Tags
throws
LibraryDoesNotExistException
Return values
CompletePackageInterface

Package corresponding to this library.

getPackages()

Return all the packages installed in the current setup.

public getPackages() : array<string|int, PackageInterface>
Return values
array<string|int, PackageInterface>

translateNamespaceToPath()

Find the filesystem path where the code for a namespace can be found.

public translateNamespaceToPath(string $namespace) : string|null
Parameters
$namespace : string

The namespace to translate.

Return values
string|null

Path representing $namespace or null if $namespace cannot be found or if the path does not exist.

Search results