cvs: pear /MDB MDB.php
| From: | Lukas Smith | Date: | Fri, 17 May 2002 14:15:07 +0000 |
| Subject: | cvs: pear /MDB MDB.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3896@lists.php.net to get a copy of this message | ||
lsmith Fri May 17 10:15:07 2002 EDT
Modified files:
/pear/MDB MDB.php
Log:
changed a couple comments
Index: pear/MDB/MDB.php
diff -u pear/MDB/MDB.php:1.5 pear/MDB/MDB.php:1.6
--- pear/MDB/MDB.php:1.5 Thu May 16 15:33:03 2002
+++ pear/MDB/MDB.php Fri May 17 10:15:07 2002
@@ -1,7 +1,7 @@
<?php
/*
*
- * @(#) $Header: /usr/repository/pear/MDB/MDB.php,v 1.5 2002/05/16 19:33:03 lsmith Exp $
+ * @(#) $Header: /usr/repository/pear/MDB/MDB.php,v 1.6 2002/05/17 14:15:07 lsmith Exp $
*
*/
@@ -140,29 +140,29 @@
/**
- * The main "DB" class is simply a container class with some static
+ * The main "MDB" class is simply a container class with some static
* methods for creating DB objects as well as some utility functions
* common to all parts of DB.
*
* The object model of DB is as follows (indentation means inheritance):
*
- * DB The main DB class. This is simply a utility class
+ * MDB The main DB class. This is simply a utility class
* with some "static" methods for creating DB objects as
* well as common utility functions for other DB classes.
*
- * DB_common The base for each DB implementation. Provides default
+ * MDB_common The base for each DB implementation. Provides default
* | implementations (in OO lingo virtual methods) for
* | the actual DB implementations as well as a bunch of
* | query utility functions.
* |
- * +-DB_mysql The DB implementation for MySQL. Inherits DB_common.
+ * +-MDB_mysql The DB implementation for MySQL. Inherits DB_common.
* When calling MDB::factory or MDB::connect for MySQL
* connections, the object returned is an instance of this
* class.
*
- * @package DB
- * @version 2
- * @author Stig Bakken <ssb@fast.no>
+ * @package MDB
+ * @version 0.9.2
+ * @author Lukas Smith <smith@dybnet.de>
* @since PHP 4.0
*/
@@ -174,7 +174,7 @@
*
* @param string $type database type, for example "mysql"
*
- * @return mixed a newly created DB object, or a DB error code on
+ * @return mixed a newly created MDB object, or a MDB error code on
* error
*
* access public
@@ -197,7 +197,7 @@
}
/**
- * Create a new DB connection object and connect to the specified
+ * Create a new MDB connection object and connect to the specified
* database
*
* @param mixed $dsn "data source name", see the MDB::parseDSN
@@ -205,17 +205,10 @@
* specified as an array of the format returned by MDB::parseDSN.
*
* @param mixed $options An associative array of option names and
- * their values. For backwards compatibility, this parameter may
- * also be a boolean that tells whether the connection should be
- * persistent. See DB_common::setOption for more information on
- * connection options.
+ * their values.
*
- * @return mixed a newly created DB connection object, or a DB
+ * @return mixed a newly created MDB connection object, or a MDB
* error object on error
- *
- * @see MDB::parseDSN
- * @see MDB::isError
- * @see DB_common::setOption
*/
function &connect($dsn, $options = false)
{
@@ -308,6 +301,9 @@
null, null, null, 'MDB_Error', true);
}
$db = new $class_name;
+ if (isset($dsninfo["phptype"])) {
+ $db->phptype = $dsninfo["phptype"];
+ }
if (isset($dsninfo["hostspec"])) {
$db->host = $dsninfo["hostspec"];
}
@@ -344,9 +340,9 @@
}
/**
- * Return the DB API version
+ * Return the MDB API version
*
- * @return int the DB API version number
+ * @return int the MDB API version number
*
* @access public
*/
@@ -356,7 +352,7 @@
}
/**
- * Tell whether a result code from a DB method is an error
+ * Tell whether a result code from a MDB method is an error
*
* @param $value int result code
*
@@ -393,7 +389,7 @@
}
/**
- * Tell whether a result code from a DB method is a warning.
+ * Tell whether a result code from a MDB method is a warning.
* Warnings differ from errors in that they are generated by DB,
* and are not fatal.
*
@@ -411,7 +407,7 @@
}
/**
- * Return a textual error message for a DB error code
+ * Return a textual error message for a MDB error code
*
* @param integer $value error code
*
@@ -630,10 +626,10 @@
}
/**
- * DB_Error implements a class for reporting portable database error
+ * MDB_Error implements a class for reporting portable database error
* messages.
*
- * @package DB
+ * @package MDB
* @author Stig Bakken <ssb@fast.no>
*/
class MDB_Error extends PEAR_Error
@@ -641,14 +637,12 @@
/**
* DB_Error constructor.
*
- * @param mixed $code DB error code, or string with error message.
+ * @param mixed $code MDB error code, or string with error message.
* @param integer $mode what "error mode" to operate in
* @param integer $level what error level to use for $mode & PEAR_ERROR_TRIGGER
* @param smixed $debuginfo additional debug info, such as the last query
*
* @access public
- *
- * @see PEAR_Error
*/
function MDB_Error($code = MDB_ERROR, $mode = PEAR_ERROR_RETURN,
@@ -663,10 +657,10 @@
}
/**
- * DB_Warning implements a class for reporting portable database
+ * MDB_Warning implements a class for reporting portable database
* warning messages.
*
- * @package DB
+ * @package MDB
* @author Stig Bakken <ssb@fast.no>
*/
class MDB_Warning extends PEAR_Error
@@ -680,8 +674,6 @@
* @param mmixed $debuginfo additional debug info, such as the last query
*
* @access public
- *
- * @see PEAR_Error
*/
function MDB_Warning($code = MDB_WARNING, $mode = PEAR_ERROR_RETURN,