class Factory (View source)

Creates a configured instance of composer.

Methods

static string
getHomeDir()

No description

static string
getCacheDir(string $home)

No description

static string
getDataDir(string $home)

No description

static Config
createConfig(IOInterface $io = null, $cwd = null)

No description

static 
getComposerFile()

No description

static 
createAdditionalStyles()

No description

static ConsoleOutput
createOutput()

Creates a ConsoleOutput instance

static 
createDefaultRepositories(IOInterface $io = null, Config $config = null, RepositoryManager $rm = null) deprecated

No description

createComposer(IOInterface $io, $localConfig = null, $disablePlugins = false, $cwd = null, $fullLoad = true)

Creates a Composer instance

static Composer
createGlobal(IOInterface $io, bool $disablePlugins = false)

No description

addLocalRepository(IOInterface $io, RepositoryManager $rm, $vendorDir)

No description

Composer|null
createGlobalComposer(IOInterface $io, Config $config, $disablePlugins, $fullLoad = false)

No description

createDownloadManager(IOInterface $io, Config $config, EventDispatcher $eventDispatcher = null, RemoteFilesystem $rfs = null)

No description

createArchiveManager(Config $config, DownloadManager $dm = null)

No description

createPluginManager(IOInterface $io, Composer $composer, Composer $globalComposer = null, bool $disablePlugins = false)

No description

createDefaultInstallers(InstallationManager $im, Composer $composer, IOInterface $io)

No description

static Composer
create(IOInterface $io, mixed $config = null, bool $disablePlugins = false)

No description

createRemoteFilesystem(IOInterface $io, Config $config = null, array $options = array())

No description

Details

static protected string getHomeDir()

Return Value

string

Exceptions

RuntimeException

static protected string getCacheDir(string $home)

Parameters

string $home

Return Value

string

static protected string getDataDir(string $home)

Parameters

string $home

Return Value

string

static Config createConfig(IOInterface $io = null, $cwd = null)

Parameters

IOInterface $io
$cwd

Return Value

Config

static getComposerFile()

static createAdditionalStyles()

static ConsoleOutput createOutput()

Creates a ConsoleOutput instance

Return Value

ConsoleOutput

static createDefaultRepositories(IOInterface $io = null, Config $config = null, RepositoryManager $rm = null) deprecated

deprecated Use Composer\Repository\RepositoryFactory::defaultRepos instead

Parameters

IOInterface $io
Config $config
RepositoryManager $rm

Composer createComposer(IOInterface $io, $localConfig = null, $disablePlugins = false, $cwd = null, $fullLoad = true)

Creates a Composer instance

Parameters

IOInterface $io
$localConfig
$disablePlugins
$cwd
$fullLoad

Return Value

Composer

Exceptions

InvalidArgumentException
UnexpectedValueException

static Composer createGlobal(IOInterface $io, bool $disablePlugins = false)

Parameters

IOInterface $io IO instance
bool $disablePlugins Whether plugins should not be loaded

Return Value

Composer

protected addLocalRepository(IOInterface $io, RepositoryManager $rm, $vendorDir)

Parameters

IOInterface $io
RepositoryManager $rm
$vendorDir

protected Composer|null createGlobalComposer(IOInterface $io, Config $config, $disablePlugins, $fullLoad = false)

Parameters

IOInterface $io
Config $config
$disablePlugins
$fullLoad

Return Value

Composer|null

DownloadManager createDownloadManager(IOInterface $io, Config $config, EventDispatcher $eventDispatcher = null, RemoteFilesystem $rfs = null)

Parameters

IOInterface $io
Config $config
EventDispatcher $eventDispatcher
RemoteFilesystem $rfs

Return Value

DownloadManager

ArchiveManager createArchiveManager(Config $config, DownloadManager $dm = null)

Parameters

Config $config The configuration
DownloadManager $dm Manager use to download sources

Return Value

ArchiveManager

protected PluginManager createPluginManager(IOInterface $io, Composer $composer, Composer $globalComposer = null, bool $disablePlugins = false)

Parameters

IOInterface $io
Composer $composer
Composer $globalComposer
bool $disablePlugins

Return Value

PluginManager

protected InstallationManager createInstallationManager()

Return Value

InstallationManager

protected createDefaultInstallers(InstallationManager $im, Composer $composer, IOInterface $io)

Parameters

InstallationManager $im
Composer $composer
IOInterface $io

protected purgePackages(WritableRepositoryInterface $repo, InstallationManager $im)

Parameters

WritableRepositoryInterface $repo repository to purge packages from
InstallationManager $im manager to check whether packages are still installed

static Composer create(IOInterface $io, mixed $config = null, bool $disablePlugins = false)

Parameters

IOInterface $io IO instance
mixed $config either a configuration array or a filename to read from, if null it will read from the default filename
bool $disablePlugins Whether plugins should not be loaded

Return Value

Composer

static RemoteFilesystem createRemoteFilesystem(IOInterface $io, Config $config = null, array $options = array())

Parameters

IOInterface $io IO instance
Config $config Config instance
array $options Array of options passed directly to RemoteFilesystem constructor

Return Value

RemoteFilesystem