public function setPort($port)
    {
        if (!ctype_digit($port)) {
            trigger_error('Port must be a positive integer: ' . var_export($port, true), E_USER_ERROR);
        }
        $this->port = $port;
    }