public function getDriver() {
        if ($this->driver === null || !$this->driver instanceof Om\xPDODriver) {
            $driverClass = '\\xPDO\\Om\\' . $this->config['dbtype'] . '\\xPDODriver';
            $this->driver= new $driverClass($this);
            if (!$this->driver) {
                $this->log(xPDO::LOG_LEVEL_ERROR, "Could not load xPDODriver class for the {$this->config['dbtype']} PDO driver.");
            }
        }
        return $this->driver;
    }