cvs: pear /MDB2 MDB2.php
| From: | Lukas Smith | Date: | Fri, 14 Oct 2005 16:30:20 +0000 |
| Subject: | cvs: pear /MDB2 MDB2.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35529@lists.php.net to get a copy of this message | ||
lsmith Fri Oct 14 12:30:20 2005 EDT
Modified files:
/pear/MDB2 MDB2.php
Log:
- added getConnection() to fetch a native connection ressource
http://cvs.php.net/diff.php/pear/MDB2/MDB2.php?r1=1.126&r2=1.127&ty=u
Index: pear/MDB2/MDB2.php
diff -u pear/MDB2/MDB2.php:1.126 pear/MDB2/MDB2.php:1.127
--- pear/MDB2/MDB2.php:1.126 Thu Oct 6 06:54:48 2005
+++ pear/MDB2/MDB2.php Fri Oct 14 12:30:18 2005
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2.php,v 1.126 2005/10/06 10:54:48 dufuz Exp $
+// $Id: MDB2.php,v 1.127 2005/10/14 16:30:18 lsmith Exp $
//
/**
@@ -1456,6 +1456,25 @@
}
// }}}
+ // {{{ getConnection()
+
+ /**
+ * Returns a native connection
+ *
+ * @return mixed a newly created MDB2 connection object, or a MDB2
+ * error object on error
+ * @access public
+ */
+ function &getConnection()
+ {
+ $result = $this->connect();
+ if (PEAR::isError($result)) {
+ return $result;
+ }
+ return $this->connection;
+ }
+
+ // }}}
// {{{ _fixResultArrayValues()
/**