libraries/ManiaLib/Database/Connection.php
static function factory(ConnectionParams $params)
    {
        if (!$params->id) {
            throw new Exception('ConnectionParams object has no ID');
        }
        if (!array_key_exists($params->id, static::$connections)) {
            static::$connections[$params->id] = new static($params);
        }
        return static::$connections[$params->id];
    }
static function factory(ConnectionParams $params)
    {
        if (!$params->id) {
            throw new Exception('ConnectionParams object has no ID');
        }
        if (!array_key_exists($params->id, static::$connections)) {
            static::$connections[$params->id] = new static($params);
        }
        return static::$connections[$params->id];
    }
Advanced connection retrieval. You can have multiple instances of the
Connection object so you can work with several MySQL servers. If you don't
give any parameters, it will work as static::getInstance()
@return \ManiaLib\Database\Connection