whitelist a package url

@param string $url
@param string $group   package group (themes, plugins, ...)
@param string $slug    package slug
@param string $version package version
@param int    $ttl
514616
public function whitelist_package( $url, $group, $slug, $version, $ttl = null ) {
		$ext = pathinfo( Utils\parse_url( $url, PHP_URL_PATH ), PATHINFO_EXTENSION );
		$key = "$group/$slug-$version.$ext";
		$this->whitelist_url( $url, $key, $ttl );
		wp_update_plugins();
	}
511984
protected static function pathsForProviderAndGroup($provider, $group)
    {
        if (! empty(static::$publishes[$provider]) && ! empty(static::$publishGroups[$group])) {
            return array_intersect_key(static::$publishes[$provider], static::$publishGroups[$group]);
        }

        return [];
    }
757888
private function checkUrl($url): void
    {
        if (!\is_string($url)) {
            $type = \gettype($url);
            throw new PingableException("Url must be of type string, '{$type}' given.");
        }

        if ('' === $url) {
            throw new PingableException('Url cannot be empty.');
        }
    }
914804
public function group(string $pattern, $callable) : RouteGroupInterface
    {
        $router = $this->getRouter();
        $group  = $router->pushGroup($pattern, $callable);
        if (method_exists($group, 'setCallbackResolver')) {
            $callbackResolver = $this->getCallbackResolver();
            if ($callbackResolver instanceof CallbackResolverInterface) {
                $group->setCallbackResolver($callbackResolver);
            }
        }

        $group($this);
        $router->popGroup();
        return $group;
    }
1114313
public function inGroup($slug)
    {
        return $this->groups->contains(function ($group) use ($slug) {
            return $group->slug === $slug || $group->id === $slug;
        });
    }
536127
public static int getUrl(final String group) {
        List<AbstractWarningsParser> allParsers = getAllParsers();
        for (int number = 0; number < allParsers.size(); number++) {
            if (allParsers.get(number).isInGroup(group)) {
                return number;
            }
        }
        throw new NoSuchElementException("No parser found for group: " + group);
    }
455951
public function removeComposerPatch($package, $url) {
    $composer_json = $this->getComposerJson();
    if (!empty($composer_json['extra']['patches'][$package])) {
      foreach ($composer_json['extra']['patches'][$package] as $key => $patch_url) {
        if ($patch_url == $url) {
          unset($composer_json['extra']['patches'][$package][$key]);
          // If that was the only patch for this module, unset the parent too.
          if (empty($composer_json['extra']['patches'][$package])) {
            unset($composer_json['extra']['patches'][$package]);
          }
          $this->writeComposerJson($composer_json);

          return TRUE;
        }
      }
    }
    return FALSE;
  }
1349796
protected function filterTtl(&$ttl): void
    {
        if ($ttl !== null) {
            if ($ttl instanceof \DateInterval) {
                $ttl = (int) $ttl->format('%s');
            }
            $ttl = (int) $ttl;
        }
    }
1280001
public static function removeGroupContent(NodeInterface $node, Group $group) {
    // Try to load group content from entity.
    if ($group_contents = GroupContent::loadByEntity($node)) {
      /* @var @param \Drupal\group\Entity\GroupContent $group_content */
      foreach ($group_contents as $group_content) {
        if ($group->id() === $group_content->getGroup()->id()) {
          $group_content->delete();
        }
      }
    }
  }
149296
public function enableCache($timestamp, $ttl)
    {
        // HttpCache alters HeaderBag's state internally
        $handler = new HttpCache($this->headerBag);
        $handler->configure($timestamp, $ttl);

        return $this;
    }
1374740
public static String getResultUrl(final String group) {
        if (group == null) { // prior 4.0
            return RESULT_URL;
        }
        else {
            return PLUGIN_ID + ParserRegistry.getUrl(group) + RESULT_URL_SUFFIX;
        }
    }
137591
protected function addPublishGroup($group, $paths)
    {
        if (! array_key_exists($group, static::$publishGroups)) {
            static::$publishGroups[$group] = [];
        }

        static::$publishGroups[$group] = array_merge(
            static::$publishGroups[$group], $paths
        );
    }
1228326
public function setGroupSlug($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->group_slug !== $v) {
            $this->group_slug = $v;
            $this->modifiedColumns[SportTableMap::COL_GROUP_SLUG] = true;
        }

        return $this;
    }
1094919
protected function FormUrl(Membergroup $group = null)
    {
        $args = array();
        if ($group)
        {
            $args['membergroup'] = $group->GetID();
        }
        return BackendRouter::ModuleUrl(new MembergroupForm(), $args);
    }
58658
public static ArrayList<String> groupToPages(Triple<String, GoogleWebmasterFilter.FilterOperator, UrlTrieNode> group) {
    ArrayList<String> ret = new ArrayList<>();
    if (group.getMiddle().equals(GoogleWebmasterFilter.FilterOperator.EQUALS)) {
      if (group.getRight().isExist()) {
        ret.add(group.getLeft());
      }
    } else if (group.getMiddle().equals(GoogleWebmasterFilter.FilterOperator.CONTAINS)) {
      UrlTrie trie = new UrlTrie(group.getLeft(), group.getRight());
      Iterator<Pair<String, UrlTrieNode>> iterator = new UrlTriePostOrderIterator(trie, 1);
      while (iterator.hasNext()) {
        Pair<String, UrlTrieNode> next = iterator.next();
        if (next.getRight().isExist()) {
          ret.add(next.getLeft());
        }
      }
    }
    return ret;
  }
889022
public function updateTtl($listUuid, $ttl)
    {
        if (!$this->findListByUuid($listUuid)) {
            throw new ListDoesNotExistsException('List '.$listUuid.' does not exists in memory.');
        }

        $ttl = ($ttl > 0) ? $ttl : null;

        // update ttl of all chunks
        $numberOfChunks = $this->getNumberOfChunks($listUuid);
        for ($i = 1; $i <= $numberOfChunks; ++$i) {
            $chunkNumber = (string) $listUuid.self::SEPARATOR.self::CHUNK.'-'.$i;
            $storedListInChunk = apcu_fetch($chunkNumber);
            apcu_delete((string) $chunkNumber);
            apcu_store(
                (string) $chunkNumber,
                $storedListInChunk,
                $ttl
            );
        }

        // update ttl of headers array (if present)
        if ($this->getHeaders($listUuid)) {
            $headers = (string) $listUuid.self::SEPARATOR.self::HEADERS;
            $storedHeaders = apcu_fetch($headers);
            apcu_delete((string) $headers);
            apcu_store(
                (string) $headers,
                $storedHeaders,
                $ttl
            );
        }

        // update index
        $this->addOrUpdateListToIndex(
            (string) $listUuid,
            $this->getCounter((string) $listUuid),
            $this->getNumberOfChunks((string) $listUuid),
            $this->getChunkSize((string) $listUuid),
            $ttl
        );
    }
1086077
public function setUrl( $url ) {
		if ( $url !== static::WILDCARD ) {
			$url = UrlUtility::addLeadingSlash( UrlUtility::addTrailingSlash( $url ) );
		}

		$this->url = $url;
	}