<?php

final class DocumentationDBFactory {



	protected static $adapter;



	public static function getAdapter() {
		if (!self::$adapter) {
			try {
				$pdo = new PDO('sqlite:var/sqlite/documentation.sqlite');
			} catch (Exception $e) {
				die($e->getMessage());
			}
			$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
			self::$adapter = new PDOAdapter($pdo, new SQL92Dialect());
		}
		return self::$adapter;
	}



} // class DocumentationDBFactory

?>