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

Breadcrumb

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

function NoProxyPattern::ipGetAddr

Returns an array of the IP in_addr and its byte size

IPv4 addresses are always mapped to IPv6, which simplifies handling and comparison.

Return value

mixed[] in_addr, size

1 call to NoProxyPattern::ipGetAddr()
NoProxyPattern::ipCheckData in vendor/composer/composer/src/Composer/Util/NoProxyPattern.php
Creates an object containing IP data if the host is an IP address

File

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

Class

NoProxyPattern
Tests URLs against NO_PROXY patterns

Namespace

Composer\Util

Code

private function ipGetAddr(string $host) : array {
    $ip = inet_pton($host);
    $size = strlen($ip);
    $mapped = $this->ipMapTo6($ip, $size);
    return [
        $mapped,
        $size,
    ];
}

API Navigation

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