1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-11 01:22:54 +00:00

Allows repositories to implement ConfigurableRepositoryInterface and thus provide getRepoConfigmethod

This commit is contained in:
Lukáš Homza 2015-11-23 23:18:24 +01:00
parent 9e9c1917e1
commit 5b748eda6c
6 changed files with 60 additions and 5 deletions

View file

@ -49,7 +49,7 @@ use Composer\Util\ProcessExecutor;
* @author Samuel Roze <samuel.roze@gmail.com>
* @author Johann Reinke <johann.reinke@gmail.com>
*/
class PathRepository extends ArrayRepository
class PathRepository extends ArrayRepository implements ConfigurableRepositoryInterface
{
/**
* @var ArrayLoader
@ -66,6 +66,11 @@ class PathRepository extends ArrayRepository
*/
private $url;
/**
* @var array
*/
private $repoConfig;
/**
* @var ProcessExecutor
*/
@ -88,10 +93,16 @@ class PathRepository extends ArrayRepository
$this->url = $repoConfig['url'];
$this->process = new ProcessExecutor($io);
$this->versionGuesser = new VersionGuesser($config, $this->process, new VersionParser());
$this->repoConfig = $repoConfig;
parent::__construct();
}
public function getRepoConfig()
{
return $this->repoConfig;
}
/**
* Initializes path repository.
*