Provide repositories from packages.

@param array $repositories

@return void
176663
private function provideRepositories(array $repositories)
    {
        foreach ($repositories as $name => $provider) {
            $this->app->bind($name, $provider);
        }
    }
906094
protected function choosePackage($packages)
    {
        $choose = $this->ask('Select package by number [1]:', '1');
        if (!is_numeric($choose) or !isset($packages[$choose - 1])) {
            $this->error('Incorrect value given!');
            $this->choosePackage($packages);
        } else {
            $index = $choose - 1;
            $result = $packages[$index];
            $this->comment('Your choice: ' . $result->getName());
            $package = $this->getPackage($result->getName());
        }
    }
1370129
public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
    {
        new Textpattern();
        parent::install($repo, $package);
        $plugin = new $this->textpatternPackager($this->getInstallPath($package), $package);
        $plugin->install();
    }
1261832
private function setDependencies(array $packages): self
    {
        $dependencies = [];
        foreach ($packages as $package) {
            foreach ($package->getRequires() as $link) {
                $dependencies[$link->getTarget()][$link->getSource()] = $link->getSource();
            }
        }

        $this->dependencies = $dependencies;

        return $this;
    }
346122
public function install(\Composer\Repository\InstalledRepositoryInterface $repo, \Composer\Package\PackageInterface $package) {
		parent::install($repo, $package);
		
		$this->removeResources($package);
		$this->installResources($package);
		
	}
1125559
public function install(
        InstalledRepositoryInterface $repo,
        PackageInterface $package
    ) {
        $installPath = $this->getInstallPath($package);
        $junglist = new FileJunglist;
        DebugPrinter::log(
            'Installing package `%s` to %s',
            array($package->getPrettyName(), $installPath,)
        );
        parent::install($repo, $package);
        DebugPrinter::log('Post-install file rotating');
        $junglist->rotateInstalledFiles($installPath);
        $junglist->copyConfigFiles($installPath);
        DebugPrinter::log('Finished installation');
    }
1003028
protected function configureRepositories()
    {
        $repositoryManager = new RepositoryManager();
        $this['repository-manager'] = $repositoryManager;

        $path = sprintf('%s/src/Repository', $this->getRootPath());

        $ns = (new \ReflectionObject($this))->getNamespaceName() . '\\Repository';
        $repositoryManager->autoloadPdoRepositories($path, $ns, $this->pdo);

        foreach ($repositoryManager->getRepositories() as $repository) {
            if (is_a($repository, 'Radvance\\Repository\\PermissionRepositoryInterface')) {
                $this->configurePermissionRepository($repository);
            }

            if (is_a($repository, 'Radvance\\Repository\\SpaceRepositoryInterface')) {
                $this->configureSpaceRepository($repository);
            }

            // Register the class for autowiring
            $this[get_class($repository)] = $repository;
        }
    }
1372126
public function setTemplateRepository($rep)
    {
        if (is_array($rep)) {
            $this->_repositories = $rep;
        } else {
            $this->_repositories[] = $rep;
        }
        return $this;
    }
946707
public void setRepositories(java.util.Collection<RepositoryNameIdPair> repositories) {
        if (repositories == null) {
            this.repositories = null;
            return;
        }

        this.repositories = new java.util.ArrayList<RepositoryNameIdPair>(repositories);
    }
33898
public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
    {
        parent::install($repo, $package);
        $this->generateVendorMetaData();
    }
992401
public function actionAllForRelease()
	{
		Output::line('Getting package info...');
		$collection = \App::$domain->vendor->info->allForRelease();
		if(!empty($collection)) {
			$flatCollection = ArrayHelper::map($collection, 'package', 'version');
			Output::line();
			Output::arr($flatCollection, 'Repository list for release');
		} else {
			Output::block('Empty list!', 'Message');
		}
	}
215532
public function setRepository($repository)
    {
        if (!$this->_repository instanceof AnDomainRepositoryAbstract) {
            if (is_string($repository) && strpos($repository, '.') === false) {
                $identifier = clone $this->getIdentifier();
                $identifier->type = 'repos';
                $identifier->path = array();
                $identifier->name = $repository;
            } else {
                $identifier = $this->getIdentifier($repository);
            }

            $repository = $identifier;
        }

        $this->_repository = $repository;
    }
1171757
public function execute(array $packages = [], array $options = [])
    {
        // Handle passed in options
        foreach ($options as $key => $value) {
            $this->getOptions()->set($key, $value);
        }

        /** @var \Composer\Composer $composer */
        $composer = $this->getComposer();
        $io = $this->getIO();
        $install = Installer::create($io, $composer);
        try {
            $install
                ->setDryRun($this->getOptions()->dryRun())
                ->setVerbose($this->getOptions()->verbose())
                ->setPreferSource($this->getOptions()->preferSource())
                ->setPreferDist($this->getOptions()->preferDist())
                ->setDevMode(!$this->getOptions()->noDev())
                ->setDumpAutoloader(!$this->getOptions()->noAutoloader())
                ->setRunScripts(!$this->getOptions()->noScripts())
                ->setOptimizeAutoloader($this->getOptions()->optimizeAutoloader())
                ->setUpdate(true)
                ->setUpdateWhitelist($packages)
                ->setWhitelistDependencies($this->getOptions()->withDependencies())
                ->setIgnorePlatformRequirements($this->getOptions()->ignorePlatformReqs())
                ->setPreferStable($this->getOptions()->preferStable())
                ->setPreferLowest($this->getOptions()->preferLowest())
                ->setRunScripts(!$this->getOptions()->noScripts())
            ;

            return $install->run();
        } catch (\Exception $e) {
            $msg = sprintf('%s received an error from Composer: %s in %s::%s', __METHOD__, $e->getMessage(), $e->getFile(), $e->getLine());
            $this->app['logger.system']->critical($msg, ['event' => 'exception', 'exception' => $e]);

            throw new PackageManagerException($e->getMessage(), $e->getCode(), $e);
        }
    }
513134
protected function bindRepositories()
	{
		$this->app->singleton('Wardrobe\Core\Repositories\PostRepositoryInterface', 'Wardrobe\Core\Repositories\DbPostRepository');

		$this->app->singleton('Wardrobe\Core\Repositories\UserRepositoryInterface', 'Wardrobe\Core\Repositories\DbUserRepository');

		$this->app->bind('Wardrobe', function()
		{
			return new \Wardrobe\Core\Facades\Wardrobe(new Repositories\DbPostRepository);
		});
	}
265040
public function loadPackagistInfos(Repo $repo)
    {
        try {
            $this->composerReader->load($repo->getSlug());

            // Load package name
            if ($this->composerReader->has('name')) {
                $repo->setPackagistSlug($this->composerReader->get('name'));
            }

            // Load authors
            if ($this->composerReader->has('authors')) {
                $repo->setAuthors($this->composerReader->get('authors'));
            }

            // Load dependencies
            if ($this->composerReader->has('require')) {
                $repo->setDependencies($this->composerReader->get('require'));
            }
        } catch (\Exception $e) {
            // We do not want to throw exception here!
        }
    }
472013
public function initialize(array $packages)
    {
        $this->registeredClassNames = $this->registerClassFiles($packages);
        $this->reflectionService->buildReflectionData($this->registeredClassNames);

        $rawCustomObjectConfigurations = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_OBJECTS);

        $configurationBuilder = new ConfigurationBuilder();
        $configurationBuilder->injectReflectionService($this->reflectionService);
        $configurationBuilder->injectLogger($this->logger);

        $this->objectConfigurations = $configurationBuilder->buildObjectConfigurations($this->registeredClassNames, $rawCustomObjectConfigurations);

        $this->setObjects($this->buildObjectsArray());
    }
1051155
def gather_repositories():
    

    for (root, dirs, files) in os.walk('.', topdown=True):
        if '.git' not in dirs:
            continue

        for dir in list(dirs):
            dirs.remove(dir)

        path = os.path.split(root)[1]
        repo = os.path.basename(path)
        yield (repo, root)