Factory
in package
Creates a configured instance of composer.
Tags
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 —createArchiveManager()
public
createArchiveManager(Config $config[, DownloadManager $dm = null ]) : ArchiveManager
Parameters
- $config : Config
-
The configuration
- $dm : DownloadManager = null
-
Manager use to download sources
Return values
ArchiveManager —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
Return values
Composer —createConfig()
public
static createConfig([IOInterface|null $io = null ][, mixed $cwd = null ]) : Config
Parameters
- $io : IOInterface|null = null
- $cwd : mixed = null
Return values
Config —createDefaultRepositories()
public
static createDefaultRepositories([IOInterface $io = null ][, Config $config = null ][, RepositoryManager $rm = null ]) : mixed
Parameters
- $io : IOInterface = null
- $config : Config = null
- $rm : RepositoryManager = null
Tags
Return values
mixed —createDownloadManager()
public
createDownloadManager(IOInterface $io, Config $config[, EventDispatcher $eventDispatcher = null ][, RemoteFilesystem $rfs = null ]) : DownloadManager
Parameters
- $io : IOInterface
- $config : Config
- $eventDispatcher : EventDispatcher = null
- $rfs : RemoteFilesystem = null
Return values
DownloadManager —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 —createOutput()
Creates a ConsoleOutput instance
public
static createOutput() : ConsoleOutput
Return values
ConsoleOutput —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 —addLocalRepository()
protected
addLocalRepository(IOInterface $io, RepositoryManager $rm, string $vendorDir) : mixed
Parameters
- $io : IOInterface
- $rm : RepositoryManager
- $vendorDir : string
Return values
mixed —createDefaultInstallers()
protected
createDefaultInstallers(InstallationManager $im, Composer $composer, IOInterface $io) : mixed
Parameters
- $im : InstallationManager
- $composer : Composer
- $io : IOInterface
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 —createInstallationManager()
protected
createInstallationManager() : InstallationManager
Return values
InstallationManager —createPluginManager()
protected
createPluginManager(IOInterface $io, Composer $composer[, Composer $globalComposer = null ][, bool $disablePlugins = false ]) : PluginManager
Parameters
- $io : IOInterface
- $composer : Composer
- $globalComposer : Composer = null
- $disablePlugins : bool = false
Return values
PluginManager —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
Return values
string —purgePackages()
protected
purgePackages(WritableRepositoryInterface $repo, InstallationManager $im) : mixed
Parameters
- $repo : WritableRepositoryInterface
-
repository to purge packages from
- $im : InstallationManager
-
manager to check whether packages are still installed
Return values
mixed —getUserDir()
private
static getUserDir() : string
Tags
Return values
string —useXdg()
private
static useXdg() : bool