public function connect()
    {
/*
        $this->db = new \SQLiteDatabase(
            $this->db_name,
            isset($this->db_options['chmod']) ? $this->db_options['chmod'] : 0644,
            $err
        );
        if ($err) throw new ErrorException(
            sprintf('Can not connect or create SQLite database "%s" [%s]!', $this->db_name, $err)
        );
*/
        try {
            $this->db = new \SQLite3($this->db_name);
        } catch (\Exception $e) {
            throw $e;
        }

        $this->db_name = str_replace(array(
            CarteBlanche::getPath('root_path'),
            CarteBlanche::getPath('db_dir')
        ), '', $this->db_name);
        return $this->db;
    }