private function getConnection()
    {
        if ($this->newConnection) {
            $this->mysqlRef = new MysqlConnection($this->host, $this->user, $this->password, $this->name, $this->key, $this->cert, $this->ca);
            $this->mysqlRef->connect();
        }else {
            $this->mysqlRef = $this->mysqlConnections->getConnection($this, $this->host, $this->user, $this->password, $this->name, $this->key, $this->cert, $this->ca);
        }
        $this->mysqliRef = $this->mysqlRef->getMysqli();
    }