function Uri::isDefaultPort
Whether the URI has the default port of the current scheme.
`Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used independently of the implementation.
2 calls to Uri::isDefaultPort()
- Uri::removeDefaultPort in vendor/
guzzlehttp/ psr7/ src/ Uri.php - UriNormalizer::normalize in vendor/
guzzlehttp/ psr7/ src/ UriNormalizer.php - Returns a normalized URI.
File
-
vendor/
guzzlehttp/ psr7/ src/ Uri.php, line 203
Class
- Uri
- PSR-7 URI implementation.
Namespace
GuzzleHttp\Psr7Code
public static function isDefaultPort(UriInterface $uri) : bool {
return $uri->getPort() === null || isset(self::DEFAULT_PORTS[$uri->getScheme()]) && $uri->getPort() === self::DEFAULT_PORTS[$uri->getScheme()];
}