Install a repository.

@param string $name
@param string $type
@param string $url

@return void
183686
public function installRepository(string $name, string $type, string $url)
    {
        if (array_key_exists('repositories', $this->definition)
            && array_key_exists($name, $this->definition['repositories'])
        ) {
            return;
        }

        $application = new Application();
        $command     = new ConfigCommand();

        $definition = clone $application->getDefinition();
        $definition->addArguments($command->getDefinition()->getArguments());
        $definition->addOptions($command->getDefinition()->getOptions());

        $input = new ArrayInput(
            [
                'command' => 'config',
                'setting-key' => 'repositories.' . $name,
                'setting-value' => [
                    $type,
                    $url
                ],
                '--working-dir' => $this->workingDir
            ],
            $definition
        );

        $application->setAutoExit(false);
        $application->run($input, $this->output);
    }
515427
public function addServiceCatalog($type, $name, array $endpoints)
    {
        if (!array_key_exists($type, $this->catalogs)) {
            $this->catalogs[$type] = [];
        }

        // check if endpoints config is correct
        foreach ($endpoints as $index => $endpoint) {
            if (!is_array($endpoint)) {
                throw new TokenException('Expecting an array for an endpoint');
            }

            $endpoints[$index] = array_change_key_case($endpoint, CASE_LOWER);

            if (!isset($endpoints[$index]['publicurl']) && !isset($endpoints[$index]['adminurl'])) {
                throw new TokenException(
                    sprintf('An endpoint must have either a "publicurl" or "adminurl" key, got %s', json_encode($endpoint))
                );
            }
        }

        $this->catalogs[$type][$name] = $endpoints;
    }
640929
public function update($name, $value)
    {
        /** @var SettingRepository $repository */
        $repository = app(SettingRepository::class);
        $repository->updateByBundle($this, $name, $value);
    }
1301750
public function addInstallReplay($name, $url)
    {
        $replayElement = new InstallReplay($name, $url);
        return $this->addElement($replayElement);
    }
197648
public function addRepository($repositoryId, $repositoryUrl, $rootUrl)
    {
        if (empty($repositoryId) || empty($repositoryUrl) || empty($rootUrl)) {
            throw new CmisInvalidArgumentException(
                'Repository Id or Repository URL or Root URL is not set!',
                1408536098
            );
        }

        $this->repositoryUrls[$repositoryId] = $repositoryUrl;
        $this->rootUrls[$repositoryId] = $rootUrl;
    }
152075
public static void link(final String name, final String type, final String url) {
        final Link link = new Link().setName(name).setType(type).setUrl(url);
        getLifecycle().updateTestCase(testResult -> testResult.getLinks().add(link));
    }
162448
public function addFunctionPreCallFunction($type, $name, callable $function)
    {
        $this->appendToArrayOrCallForEachAlias($type, function() use ($type, $name, $function){
            $this->fnPreCallFunctions[$type][$name][] = $function;
        }, function($target) use ( $function, $name){
            $this->addFunctionPreCallFunction($target, $name, $function);
        });


    }
1366956
public void addRepository(String url) throws ProjectException {
        List<Repository> repositories = getRepositories();

        if ( repositories == null ) {
            repositories = new ArrayList<Repository>();
        }

        try {
            Repository repository = RepoBuilder.repositoryFromUrl( url );
            repositories.add( repository );
        } catch (MalformedURLException e) {
            throw new ProjectException( e );
        }

        getMavenModel().setRepositories( repositories );
    }
787946
public function requestField(string $type, string $name): void
    {
        $this->fields[$type][] = $name;
        $this->updateUriQuery();
    }
545947
private function addAsset($type, $uri)
    {
        if(!array_key_exists($type, $this->assets)){
            $this->assets[$type] = array();
        }
        if(!empty($uri) && !in_array($uri, $this->assets[$type])){
            $this->assets[$type][] = $uri;
        }
    }
181228
protected static function _down($name, $type)
	{
		// -v or --version
		$version = \Cli::option('v', \Cli::option('version', null));

		// if version has a value, make sure only 1 item was passed
		if ($version and (static::$default + static::$module_count + static::$package_count > 1))
		{
			\Cli::write('Migration: version only accepts 1 item.');
			return;
		}

		$migrations = \Migrate::down($version, $name, $type);

		if ($migrations)
		{
			\Cli::write('Reverted migrations for '.$type.':'.$name.':', 'green');
			foreach ($migrations as $migration)
			{
				\Cli::write('- '.$migration);
			}
		}
		else
		{
			// there is no 'down'...
			\Cli::write('There are no migrations installed to revert for '.$type.':'.$name.'.');
		}
	}
720948
public function addInstallMacroblock($name, $file, $url)
    {
        $macroblockElement = new InstallMacroblock($name, $file, $url);
        return $this->addElement($macroblockElement);
    }
1336373
public function addTabURL($name, $url)
    {
        $item = $this->addTabMenuItem($name);
        $this->addSubView($item->name);

        $item->setPath($url);
    }
1284298
private function sourceDeclaration(string $name, string $type, string $model): SourceDeclaration
    {
        return new SourceDeclaration(
            $this->getConfig()->className('source', $name),
            $type,
            $model
        );
    }
409754
public function addRoute(string $type, string $name, string $route): void{
        if (!isset($this->routes[$name])) {
            $this->routes[$name] = [];
        }
        $this->routes[$name][$type] = $route;
    }
311407
private function load(string $type, string $slug, string $name = ''): string
    {
        $slug = \ltrim($slug, '/');
        $slug = \rtrim($slug, '.php');

        $this->doAction($type, $slug, $name);

        $slug = $this->rewriteSlug($type, $slug);
        $rel_dir = $this->utilities->fileSystem->relativeDir();

        $templates = [];

        if ($name) {
            $templates[] = "{$slug}-{$name}.php";

            if ($rel_dir) {
                $templates[] = "{$rel_dir}/{$slug}-{$name}.php";
            }
        }

        $templates[] = "{$slug}.php";

        if ($rel_dir) {
            $templates[] = "{$rel_dir}/{$slug}.php";
        }

        return \locate_template($templates, true, false);
    }
62896
public function loadFilter($type, $name)
    {
        $_plugin = "smarty_{$type}filter_{$name}";
        $_filter_name = $_plugin;
        if ($this->smarty->loadPlugin($_plugin)) {
            if (class_exists($_plugin, false)) {
                $_plugin = array($_plugin, 'execute');
            }
            if (is_callable($_plugin)) {
                $this->smarty->registered_filters[$type][$_filter_name] = $_plugin;
                return true;
            }
        }
        throw new SmartyException("{$type}filter \"{$name}\" not callable");
        return false;
    }