RootPackage::getConfig
parent
a8bb93aa1f
commit
3905f275d6
|
@ -141,6 +141,10 @@ class RootPackageLoader extends ArrayLoader
|
|||
$realPackage->setPreferStable((bool) $config['prefer-stable']);
|
||||
}
|
||||
|
||||
if (isset($config['config'])) {
|
||||
$realPackage->setConfig($config['config']);
|
||||
}
|
||||
|
||||
$repos = RepositoryFactory::defaultRepos(null, $this->config, $this->manager);
|
||||
foreach ($repos as $repo) {
|
||||
$this->manager->addRepository($repo);
|
||||
|
|
|
@ -22,6 +22,7 @@ class RootPackage extends CompletePackage implements RootPackageInterface
|
|||
protected $minimumStability = 'stable';
|
||||
protected $preferStable = false;
|
||||
protected $stabilityFlags = array();
|
||||
protected $config = array();
|
||||
protected $references = array();
|
||||
protected $aliases = array();
|
||||
|
||||
|
@ -79,6 +80,24 @@ class RootPackage extends CompletePackage implements RootPackageInterface
|
|||
return $this->preferStable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the config
|
||||
*
|
||||
* @param array $config
|
||||
*/
|
||||
public function setConfig($config)
|
||||
{
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
return $this->config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the references
|
||||
*
|
||||
|
|
|
@ -58,6 +58,13 @@ interface RootPackageInterface extends CompletePackageInterface
|
|||
*/
|
||||
public function getPreferStable();
|
||||
|
||||
/**
|
||||
* Returns the root package's configuration
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getConfig();
|
||||
|
||||
/**
|
||||
* Set the required packages
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue