Documentation

Factory
in package

Creates a configured instance of composer.

Tags
author

Ryan Weaver ryan@knplabs.com

author

Jordi Boggiano j.boggiano@seld.be

author

Igor Wiedler igor@wiedler.ch

author

Nils Adermann naderman@naderman.de

Table of Contents

create()  : Composer
createAdditionalStyles()  : mixed
createArchiveManager()  : ArchiveManager
createComposer()  : Composer
Creates a Composer instance
createConfig()  : Config
createDefaultRepositories()  : mixed
createDownloadManager()  : DownloadManager
createGlobal()  : Composer
createOutput()  : ConsoleOutput
Creates a ConsoleOutput instance
createRemoteFilesystem()  : RemoteFilesystem
getComposerFile()  : mixed
addLocalRepository()  : mixed
createDefaultInstallers()  : mixed
createGlobalComposer()  : Composer|null
createInstallationManager()  : InstallationManager
createPluginManager()  : PluginManager
getCacheDir()  : string
getDataDir()  : string
getHomeDir()  : string
purgePackages()  : mixed
getUserDir()  : string
useXdg()  : bool

Methods

create()

public static create(IOInterface $io[, mixed $config = null ][, bool $disablePlugins = false ]) : Composer
Parameters
$io : IOInterface

IO instance

$config : mixed = null

either a configuration array or a filename to read from, if null it will read from the default filename

$disablePlugins : bool = false

Whether plugins should not be loaded

Return values
Composer

createAdditionalStyles()

public static createAdditionalStyles() : mixed
Return values
mixed

createComposer()

Creates a Composer instance

public createComposer(IOInterface $io[, array<string|int, mixed>|string|null $localConfig = null ][, bool $disablePlugins = false ][, mixed $cwd = null ][, bool $fullLoad = true ]) : Composer
Parameters
$io : IOInterface

IO instance

$localConfig : array<string|int, mixed>|string|null = null

either a configuration array or a filename to read from, if null it will read from the default filename

$disablePlugins : bool = false

Whether plugins should not be loaded

$cwd : mixed = null
$fullLoad : bool = true

Whether to initialize everything or only main project stuff (used when loading the global composer)

Tags
throws
InvalidArgumentException
throws
UnexpectedValueException
Return values
Composer

createGlobal()

public static createGlobal(IOInterface $io[, bool $disablePlugins = false ]) : Composer
Parameters
$io : IOInterface

IO instance

$disablePlugins : bool = false

Whether plugins should not be loaded

Return values
Composer

createRemoteFilesystem()

public static createRemoteFilesystem(IOInterface $io[, Config $config = null ][, array<string|int, mixed> $options = array() ]) : RemoteFilesystem
Parameters
$io : IOInterface

IO instance

$config : Config = null

Config instance

$options : array<string|int, mixed> = array()

Array of options passed directly to RemoteFilesystem constructor

Return values
RemoteFilesystem

getComposerFile()

public static getComposerFile() : mixed
Return values
mixed

createGlobalComposer()

protected createGlobalComposer(IOInterface $io, Config $config, mixed $disablePlugins[, mixed $fullLoad = false ]) : Composer|null
Parameters
$io : IOInterface
$config : Config
$disablePlugins : mixed
$fullLoad : mixed = false
Return values
Composer|null

getCacheDir()

protected static getCacheDir(string $home) : string
Parameters
$home : string
Return values
string

getDataDir()

protected static getDataDir(string $home) : string
Parameters
$home : string
Return values
string

getHomeDir()

protected static getHomeDir() : string
Tags
throws
RuntimeException
Return values
string

getUserDir()

private static getUserDir() : string
Tags
throws
RuntimeException
Return values
string

useXdg()

private static useXdg() : bool
Return values
bool

Search results