protected function driver($name, $data = array())
    {
        if (in_array($name, $this->mysql) === true) {
            $dsn = (string) 'mysql:host=%s;dbname=%s';

            $dsn = sprintf($dsn, $data['hostname'], $data['database']);

            $pdo = new \PDO($dsn, $data['username'], $data['password']);

            return new MySQLDriver($pdo, (string) $data['database']);
        }

        if (in_array($name, $this->sqlite)) {
            return new SQLiteDriver(new \PDO($data['hostname']));
        }

        $message = 'Database driver "%s" not found.';

        $message = sprintf($message, (string) $name);

        throw new DriverNotFoundException($message);
    }