src/Anshar/Http/UriParts/Port.php
public function toUriString(Scheme $scheme = null)
    {
        $normalized_port = $this->normalizePortAgainstScheme($scheme);

        $uri_string = (string) $normalized_port;

        if (!is_null($normalized_port)) {
            $uri_string = ":" . $uri_string;
        }

        return $uri_string;
    }
public function toUriString(Scheme $scheme = null)
    {
        $normalized_port = $this->normalizePortAgainstScheme($scheme);

        $uri_string = (string) $normalized_port;

        if (!is_null($normalized_port)) {
            $uri_string = ":" . $uri_string;
        }

        return $uri_string;
    }
public function toUriString ( Scheme $ scheme = null ) { $ normalized_port = $ this -> normalizePortAgainstScheme ( $ scheme ) ; $ uri_string = ( string ) $ normalized_port ; if ( ! is_null ( $ normalized_port ) ) { $ uri_string = ":" . $ uri_string ; } return $ uri_string ; }
Returns a string representation of the port formatted so that it can be compiled into a complete URI string
per the Uri object's string specification.

If the port is empty, toUriString returns an empty string; if the port is not empty, toUriString returns the
port prefixed with a colon.

toUriString will also check the port against an optionally-provided scheme; if the port is standard for the given
scheme, toUriString returns an empty string.

@see Uri::__toString

@param Scheme|null $scheme   [optional] A scheme against which to check if the port is the standard

@return string               A string representation of the port formatted for a complete URI string
Returns a string representation of the port formatted so that it can be compiled into a complete URI string per the Uri object s string specification .