cvs: php4 /pear DB.php PEAR.php.in /pear/DB common.php storage.php

From: Date: Mon, 28 Aug 2000 23:09:36 +0000
Subject: cvs: php4 /pear DB.php PEAR.php.in /pear/DB common.php storage.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1438@lists.php.net to get a copy of this message
ssb Mon Aug 28 16:09:36 2000 EDT Modified files: /php4/pear DB.php PEAR.php.in /php4/pear/DB common.php storage.php Log: * renamed toString method to __string_value Index: php4/pear/DB.php diff -u php4/pear/DB.php:1.29 php4/pear/DB.php:1.30 --- php4/pear/DB.php:1.29 Sun Aug 27 12:46:00 2000 +++ php4/pear/DB.php Mon Aug 28 16:09:36 2000 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: DB.php,v 1.29 2000/08/27 19:46:00 ssb Exp $ +// $Id: DB.php,v 1.30 2000/08/28 23:09:36 ssb Exp $ // // Database independent query interface. // @@ -369,7 +369,7 @@ if (!$parsed['database']) $dsn = preg_replace('|/+$|', '', $dsn); - $parsed['hostspec'] = $dsn; + $parsed['hostspec'] = urldecode($dsn); if (!$parsed['dbsyntax']) { $parsed['dbsyntax'] = $parsed['phptype']; Index: php4/pear/PEAR.php.in diff -u php4/pear/PEAR.php.in:1.3 php4/pear/PEAR.php.in:1.4 --- php4/pear/PEAR.php.in:1.3 Wed Aug 23 18:34:16 2000 +++ php4/pear/PEAR.php.in Mon Aug 28 16:09:36 2000 @@ -17,7 +17,7 @@ // | Stig Bakken <ssb@fast.no> | // +----------------------------------------------------------------------+ // -// $Id: PEAR.php.in,v 1.3 2000/08/24 01:34:16 sterling Exp $ +// $Id: PEAR.php.in,v 1.4 2000/08/28 23:09:36 ssb Exp $ // define('PEAR_ERROR_RETURN', 0); @@ -233,14 +233,14 @@ } // }}} - // {{{ toString() + // {{{ __string_value() /** * Make a string representation of this object. * * @return string a string with an object "summary" */ - function toString() { + function __string_value() { $modes = array(PEAR_ERROR_RETURN => "return", PEAR_ERROR_PRINT => "print", PEAR_ERROR_TRIGGER => "trigger", @@ -248,9 +248,11 @@ $levels = array(E_USER_NOTICE => "notice", E_USER_WARNING => "warning", E_USER_ERROR => "error"); - return sprintf("[%s: message=%s code=%d mode=%s level=%s prefix=%s prepend=%s append=%s]", - $this->message, $this->code, $modes[$this->mode], $levels[$this->level], - $this->error_message_prefix, $this->error_prepend, $this->error_append); + return sprintf("[%s: message=\"%s\" code=%d mode=%s level=%s prefix=\"%s\" prepend=\"%s\" append=\"%s\"]", + get_class($this), $this->message, $this->code, + $modes[$this->mode], $levels[$this->level], + $this->error_message_prefix, $this->error_prepend, + $this->error_append); } // }}} Index: php4/pear/DB/common.php diff -u php4/pear/DB/common.php:1.15 php4/pear/DB/common.php:1.16 --- php4/pear/DB/common.php:1.15 Sun Aug 27 12:46:00 2000 +++ php4/pear/DB/common.php Mon Aug 28 16:09:36 2000 @@ -47,9 +47,9 @@ var $prepare_maxstmt; // }}} - // {{{ toString() + // {{{ __string_value() - function toString() { + function __string_value() { $info = get_class($this); $info .= ": (phptype=" . $this->phptype . Index: php4/pear/DB/storage.php diff -u php4/pear/DB/storage.php:1.6 php4/pear/DB/storage.php:1.7 --- php4/pear/DB/storage.php:1.6 Sun Jul 23 22:41:00 2000 +++ php4/pear/DB/storage.php Mon Aug 28 16:09:36 2000 @@ -124,7 +124,7 @@ * Output a simple description of this DB_storage object. * @return string object description */ - function toString() { + function __string_value() { $info = get_class(&$this); $info .= " (table="; $info .= $this->_table; @@ -132,7 +132,7 @@ $info .= $this->_keycolumn; $info .= ", dbh="; if (is_object($this->_dbh)) { - $info .= $this->_dbh->toString(); + $info .= $this->_dbh->__string_value(); } else { $info .= "null"; }

« previous php.cvs (#1438) next »