1
0
Fork 0

Move methods for PR readability and fix phpdoc

pull/3994/head
Nils Adermann 2015-06-08 18:45:03 +02:00
parent 67f10c1601
commit 65243ca392
1 changed files with 27 additions and 20 deletions

View File

@ -100,6 +100,14 @@ class ComposerRepository extends ArrayRepository
return $this->rootAliases; return $this->rootAliases;
} }
/**
* Load all packages with given names and dependencies
*
* @param array $packageNames
* @param callable|null $acceptableCallback Callback to filter packages
*
* @return array The loaded package objects
*/
public function loadRecursively(array $packageNames, $acceptableCallback) public function loadRecursively(array $packageNames, $acceptableCallback)
{ {
$workQueue = new \SplQueue; $workQueue = new \SplQueue;
@ -258,11 +266,29 @@ class ComposerRepository extends ArrayRepository
return $providers; return $providers;
} }
protected function configurePackageTransportOptions(PackageInterface $package)
{
foreach ($package->getDistUrls() as $url) {
if (strpos($url, $this->baseUrl) === 0) {
$package->setTransportOptions($this->options);
return;
}
}
}
public function hasProviders()
{
$this->loadRootServerFile();
return $this->hasProviders;
}
/** /**
* Loads package data for a given package name or provider name * Loads package data for a given package name or provider name
* *
* @param string $name * @param string $name
* @param callable $acceptableCallback A callback to check if a package should be loaded * @param callable|null $acceptableCallback A callback to check if a package should be loaded
* @param bool $exactMatch Whether packages only providing the name should be ignored * @param bool $exactMatch Whether packages only providing the name should be ignored
* *
* @return array All packages that were loaded * @return array All packages that were loaded
@ -337,25 +363,6 @@ class ComposerRepository extends ArrayRepository
return $loadedPackages; return $loadedPackages;
} }
protected function configurePackageTransportOptions(PackageInterface $package)
{
foreach ($package->getDistUrls() as $url) {
if (strpos($url, $this->baseUrl) === 0) {
$package->setTransportOptions($this->options);
return;
}
}
}
public function hasProviders()
{
$this->loadRootServerFile();
return $this->hasProviders;
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */