You are here

private static function Uri::isNonStandardPort in Zircon Profile 8

Same name in this branch
  1. 8 vendor/zendframework/zend-diactoros/src/Uri.php \Zend\Diactoros\Uri::isNonStandardPort()
  2. 8 vendor/guzzlehttp/psr7/src/Uri.php \GuzzleHttp\Psr7\Uri::isNonStandardPort()
Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/src/Uri.php \GuzzleHttp\Psr7\Uri::isNonStandardPort()

Is a given port non-standard for the current scheme?

Parameters

string $scheme:

string $host:

int $port:

Return value

bool

2 calls to Uri::isNonStandardPort()
Uri::filterPort in vendor/guzzlehttp/psr7/src/Uri.php
Uri::getAuthority in vendor/guzzlehttp/psr7/src/Uri.php
Retrieve the authority component of the URI.

File

vendor/guzzlehttp/psr7/src/Uri.php, line 514

Class

Uri
Basic PSR-7 URI implementation.

Namespace

GuzzleHttp\Psr7

Code

private static function isNonStandardPort($scheme, $host, $port) {
  if (!$scheme && $port) {
    return true;
  }
  if (!$host || !$port) {
    return false;
  }
  return !isset(static::$schemes[$scheme]) || $port !== static::$schemes[$scheme];
}