Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NoProxyPattern.php

function NoProxyPattern::test

Returns true if a URL matches the NO_PROXY pattern

File

vendor/composer/composer/src/Composer/Util/NoProxyPattern.php, line 50

Class

NoProxyPattern
Tests URLs against NO_PROXY patterns

Namespace

Composer\Util

Code

public function test(string $url) : bool {
    if ($this->noproxy) {
        return true;
    }
    if (!($urlData = $this->getUrlData($url))) {
        return false;
    }
    foreach ($this->hostNames as $index => $hostName) {
        if ($this->match($index, $hostName, $urlData)) {
            return true;
        }
    }
    return false;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal