Adds the URLs of a repository to the cache.

@param string $repositoryId
@param string $repositoryUrl
@param string $rootUrl
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;
    }
533535
public void setEntityBaseUrl(final URL base) {
        reader.setEntityResolver(new EntityResolver() {
            public InputSource resolveEntity(final String publicId, final String systemId) throws IOException {
                return new InputSource(new URL(base, systemId).openStream());
            }
        });
    }
1074226
@Nullable
  public static URL uriToUrl(@Nullable Uri uri) {
    if (uri == null) {
      return null;
    }

    try {
      return new URL(uri.toString());
    } catch (java.net.MalformedURLException e) {
      // This should never happen since we got a valid uri
      throw new RuntimeException(e);
    }
  }
232057
public synchronized Repository getRepository() throws ResourceException {
        if (this.repository == null) {
            LOGGER.debug("Deploying repository URL [{0}]", repositoryURL);
            this.repository = deployRepository(repositoryURL);
        }
        return this.repository;
    }
1142214
static function repositoryInformation( $repositoryID )
    {
        $packageRepositories = eZPackage::packageRepositories();
        foreach ( $packageRepositories as $packageRepository )
        {
            if ( $packageRepository['id'] == $repositoryID )
                return $packageRepository;
        }
        return false;
    }
1015885
protected function seed($slug, Repository $repository)
    {
        $module        = $repository->where('slug', $slug);
        $params        = [];
        $namespacePath = $repository->getNamespace();
        $rootSeeder    = $module['basename'].'DatabaseSeeder';
        $fullPath      = $namespacePath.'\\'.$module['basename'].'\Database\Seeds\\'.$rootSeeder;

        if (class_exists($fullPath)) {
            if ($this->option('class')) {
                $params['--class'] = $this->option('class');
            } else {
                $params['--class'] = $fullPath;
            }

            if ($option = $this->option('database')) {
                $params['--database'] = $option;
            }

            if ($option = $this->option('force')) {
                $params['--force'] = $option;
            }

            $this->call('db:seed', $params);

            event($slug.'.module.seeded', [$module, $this->option()]);
        }
    }
1318091
def add_repository(self, name, repository_type, repository_class,
                       aggregate_class, make_default, configuration):
        
        repo_mgr = self.get_registered_utility(IRepositoryManager)
        if name is None:
            # If no name was given, this is assumed to be the ROOT repository
            # for the given repository type.
            name = REPOSITORY_DOMAINS.ROOT
        repo = repo_mgr.new(repository_type, name=name,
                            make_default=make_default,
                            repository_class=repository_class,
                            aggregate_class=aggregate_class,
                            configuration=configuration)
        repo_mgr.set(repo)
742472
public static RemoteRepository remoteRepositoryFromUrl(String url) throws MalformedURLException {
        URL parsedUrl = new URL(url);

        StringBuffer id = new StringBuffer(parsedUrl.getHost());
        String path = parsedUrl.getPath();
        if (path.length() > 0) {
            path = path.replaceFirst("/", "").replaceAll("/", "-").replaceAll(":", "-");
            id.append("-");
            id.append(path);
        }

        if (parsedUrl.getPort() > -1) {
            id.append("-");
            id.append(parsedUrl.getPort());
        }

        return new RemoteRepository(id.toString(), "default", url);
    }
520575
public function add(string $rel, HttpUri $uri): Link
    {
        $link = new Link($rel, $uri);
        if (isset($this->links[$rel])) {
            if (!is_array($this->links[$rel])) {
                $this->links[$rel] = [$this->links[$rel]];
            }

            $this->links[$rel][] = $link;
        } else {
            $this->links[$rel] = $link;
        }

        return $link;
    }
903056
public void addRemoteRepositoryByUrl(String url, String username, String password) throws URLException {
        RemoteRepository remoteRepo;
        try {
            remoteRepo = RepoBuilder.remoteRepositoryFromUrl(url);
        } catch (MalformedURLException e) {
            throw new URLException(e);
        }
        remoteRepo = remoteRepo.setAuthentication(new Authentication(username, password));
        addRemoteRepository(remoteRepo);
    }
927976
public function setURL($server, $root, $url, $protocol=null) {
		$this->url = new \Asgard\Http\URL($this, $server, $root, $url, $protocol);

		preg_match('/\.([a-zA-Z0-9]{1,5})$/', $this->url->get(), $matches);
		if(isset($matches[1]))
			$this->setParam('format', $matches[1]);
		return $this;
	}
362248
public function setCustomRepositoryClass(?string $repositoryClassName) : void
    {
        if ($this->isEmbeddedDocument || $this->isQueryResultDocument) {
            return;
        }

        $this->customRepositoryClassName = $repositoryClassName;
    }
1158421
private function addBaseurl2ImageSource(&$filtered, $baseurl)
    {
        $textf  = $this->di->get("textfilter");
        $url    = $this->di->get("url");

        // Use callback to url->create() instead of string concat
        $callback = function ($route) use ($url, $baseurl) {
            return $url->asset($route, $baseurl);
        };

        $filtered->text =
            $textf->addBaseurlToImageSource($filtered->text, $baseurl, $callback);
    }
56938
public function getSiteByRootPageId($rootPageId)
    {
        $cacheId = 'SiteRepository' . '_' . 'getSiteByPageId' . '_' . $rootPageId;

        $methodResult = $this->runtimeCache->get($cacheId);
        if (!empty($methodResult)) {
            return $methodResult;
        }

        $methodResult = $this->buildSite($rootPageId);
        $this->runtimeCache->set($cacheId, $methodResult);

        return $methodResult;
    }
806494
protected function getObjectUrl($repositoryId, $objectId, $selector = null)
    {
        $result = $this->getRepositoryUrlCache()->getObjectUrl($repositoryId, $objectId, $selector);

        if ($result === null) {
            $this->getRepositoriesInternal($repositoryId);
            $result = $this->getRepositoryUrlCache()->getObjectUrl($repositoryId, $objectId, $selector);
        }

        if ($result === null) {
            throw new CmisObjectNotFoundException(
                sprintf(
                    'Unknown Object! Repository: "%s" | Object: "%s" | Selector: "%s"',
                    $repositoryId,
                    $objectId,
                    $selector
                )
            );
        }

        return $result;
    }
36148
@Override
    public void setProxyURL(final String url) throws RepositoryRuntimeException {
        try {
            getNode().setProperty(PROXY_FOR, url);
            // clear redirect property, in case it used to be a redirect
            getNode().setProperty(REDIRECTS_TO, (Value) null);
        } catch (final RepositoryException e) {
            throw new RepositoryRuntimeException(e);
        }
    }
382121
private void addRepository(String repositoryId, RepositoryWrapper repositoryHolder) {
        repositories.put(repositoryId, repositoryHolder);
        try {
            numRepos = getNumberOfRepositories();
        } catch (WIMException e) {
            // okay
        }
    }