public static function fromArray(Array $parameters)
    {
        $host = isset($parameters['host']) ? $parameters['host'] : self::DEFAULT_HOST;
        $port = isset($parameters['port']) ? $parameters['port'] : self::DEFAULT_PORT;
        $user = isset($parameters['username']) ? $parameters['username'] : null;
        $pass = isset($parameters['password']) ? $parameters['password'] : null;
        $db = isset($parameters['database']) ? $parameters['database'] : null;

        return new self($host, $port, $user, $pass, $db);
    }