From bb0e12e3bf9629b7209a4e5e72caff8395e2bf96 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mart=C3=ADn=20Marrese?= Date: Fri, 6 Feb 2004 19:25:02 +0000 Subject: [PATCH] Agrego la clase YATTA_DB para el manejo interno de las bases de datos. --- lib/YATTA/DB.php | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 lib/YATTA/DB.php diff --git a/lib/YATTA/DB.php b/lib/YATTA/DB.php new file mode 100644 index 0000000..4ef69e7 --- /dev/null +++ b/lib/YATTA/DB.php @@ -0,0 +1,54 @@ + +------------------------------------------------------------------------------- +$Id$ +-----------------------------------------------------------------------------*/ + +require_once 'DB.php'; + +/** + * Manejo interno de las bases de datos. + * + * @access public + */ +class YATTA_DB extends DB { + + /** + * Realiza la conexion con la base de datos. + * + * @return DB + * @access public + * @static + */ + function connect($CONF) + { + $dsn = $CONF['dsn']; + unset ($CONF['db']['dsn']); + $db = DB::connect($dsn, $CONF); + if (DB::isError($db)) { + trigger_error($db->getMessage(), E_USER_ERROR); + } + return $db; + } +} +?> -- 2.43.0