public function setPort($port)
    {
        if (preg_match(self::PATTERN_MATCH_PORT, $port) !== 1) {
            throw new \InvalidArgumentException('"' . $port . '" is not valid port number as part of a URI.', 1184071241);
        }

        $this->port = (integer)$port;
    }
public function setPort($port)
    {
        if (preg_match(self::PATTERN_MATCH_PORT, $port) !== 1) {
            throw new \InvalidArgumentException('"' . $port . '" is not valid port number as part of a URI.', 1184071241);
        }

        $this->port = (integer)$port;
    }
public function setPort ( $ port ) { if ( preg_match ( self :: PATTERN_MATCH_PORT , $ port ) !== 1 ) { throw new \ InvalidArgumentException ( '"' . $ port . '" is not valid port number as part of a URI.' , 1184071241 ) ; } $ this -> port = ( integer ) $ port ; }
Sets the port in the URI

@param string $port The port number
@return void
@throws \InvalidArgumentException
@deprecated Since Flow 5.1, use withPort instead
@see withPort()
Sets the port in the URI