1
0
Fork 0

Clean up unneeded initialization stuff

pull/171/head
Jordi Boggiano 2011-12-21 16:38:08 +01:00
parent 9452a94e30
commit f051778192
1 changed files with 0 additions and 21 deletions

View File

@ -24,15 +24,6 @@ class RepositoryManager
private $repositories = array();
private $repositoryClasses = array();
/**
* Used for lazy loading of packages and their contained repositories
*
* This is a performance optimization to avoid loading all packages unless they are needed
*
* @var Boolean
*/
private $initialized;
/**
* Searches for a package by it's name and version in managed repositories.
*
@ -58,11 +49,6 @@ class RepositoryManager
public function addRepository(RepositoryInterface $repository)
{
$this->repositories[] = $repository;
// already initialized, so initialize new repos on the fly
if ($this->initialized) {
$repository->getPackages();
}
}
/**
@ -101,13 +87,6 @@ class RepositoryManager
*/
public function getRepositories()
{
if (!$this->initialized) {
$this->initialized = true;
// warm up repos to be sure all sub-repos are added before we return
foreach ($this->repositories as $repository) {
$repository->getPackages();
}
}
return $this->repositories;
}