You are here

private 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/zendframework/zend-diactoros/src/Uri.php \Zend\Diactoros\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::getAuthority in vendor/zendframework/zend-diactoros/src/Uri.php
Retrieve the authority component of the URI.
Uri::getPort in vendor/zendframework/zend-diactoros/src/Uri.php
Retrieve the port component of the URI.

File

vendor/zendframework/zend-diactoros/src/Uri.php, line 505

Class

Uri
Implementation of Psr\Http\UriInterface.

Namespace

Zend\Diactoros

Code

private function isNonStandardPort($scheme, $host, $port) {
  if (!$scheme) {
    return true;
  }
  if (!$host || !$port) {
    return false;
  }
  return !isset($this->allowedSchemes[$scheme]) || $port !== $this->allowedSchemes[$scheme];
}