X-Git-Url: https://git.llucax.com/mecon/ai.git/blobdiff_plain/85d73a355f6ca393b1be0575338782a4502a073d:/sistema/local_lib/AIDB.php..6e0df7b212f1a721cf8df887c629b67957871225:/lib/AI/DB.php diff --git a/sistema/local_lib/AIDB.php b/lib/AI/DB.php similarity index 79% rename from sistema/local_lib/AIDB.php rename to lib/AI/DB.php index 82d07c7..cd66f1d 100644 --- a/sistema/local_lib/AIDB.php +++ b/lib/AI/DB.php @@ -31,27 +31,44 @@ require_once 'DB.php'; // ~X2C -// +X2C Class 503 :AIDB +// +X2C Class 503 :AI_DB /** * Base de datos del Administrador de Intranet. * * @access public */ -class AIDB extends DB { +class AI_DB extends DB { // ~X2C // +X2C Operation 506 /** + * @param string $confFile Archivo de configuracin de la base de datos. + * * @return &mixed * @access public */ - function &connect() // ~X2C + function &connect($confFile) // ~X2C { - $conf = parse_ini_file(dirname(__FILE__) . '/../conf/AIDB.ini', true); + $conf = parse_ini_file($confFile, true); return DB::connect($conf['dsn'], $conf['opciones']); } // -X2C -} // -X2C Class :AIDB + // +X2C Operation 511 + /** + * Verifica si un objeto es un error. + * + * @param mixed &$var Variable a chequear si es un error. + * + * @return bool + * @access public + */ + function isError(&$var) // ~X2C + { + return is_a($var, 'ai_error'); + } + // -X2C + +} // -X2C Class :AI_DB -?> \ No newline at end of file +?>