cvs: pear /DB DB.php

From: Date: Mon, 05 Jan 2004 02:21:20 +0000
Subject: cvs: pear /DB DB.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-15357@lists.php.net to get a copy of this message
danielc Sun Jan 4 21:21:20 2004 EDT Modified files: /pear/DB DB.php Log: Beautify docblock for parseDSN(). Index: pear/DB/DB.php diff -u pear/DB/DB.php:1.31 pear/DB/DB.php:1.32 --- pear/DB/DB.php:1.31 Sun Jan 4 21:16:07 2004 +++ pear/DB/DB.php Sun Jan 4 21:21:20 2004 @@ -17,7 +17,7 @@ // | Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: DB.php,v 1.31 2004/01/05 02:16:07 danielc Exp $ +// $Id: DB.php,v 1.32 2004/01/05 02:21:20 danielc Exp $ // // Database independent query interface. // @@ -193,7 +193,7 @@ * @author Stig Bakken <ssb@php.net> * @author Tomas V.V.Cox <cox@idecnet.com> * @since PHP 4.0 - * @version $Id: DB.php,v 1.31 2004/01/05 02:16:07 danielc Exp $ + * @version $Id: DB.php,v 1.32 2004/01/05 02:21:20 danielc Exp $ * @category Database */ @@ -426,28 +426,20 @@ // }}} // {{{ parseDSN() + /** - * Parse a data source name - * - * A array with the following keys will be returned: - * phptype: Database backend used in PHP (mysql, odbc etc.) - * dbsyntax: Database used with regards to SQL syntax etc. - * protocol: Communication protocol to use (tcp, unix etc.) - * hostspec: Host specification (hostname[:port]) - * database: Database to use on the DBMS server - * username: User name for login - * password: Password for login - * mode: chmod mode for SQLite databases + * Parse a data source name. * * Additional keys can be added by appending a URI query string to the * end of the DSN. * * The format of the supplied DSN is in its fullest form: - * + * <code> * phptype(dbsyntax)://username:password@protocol+hostspec/database?option=8&another=true + * </code> * * Most variations are allowed: - * + * <code> * phptype://username:password@protocol+hostspec:110//usr/db_file.db?mode=0644 * phptype://username:password@hostspec/database_name * phptype://username:password@hostspec @@ -456,10 +448,19 @@ * phptype://hostspec * phptype(dbsyntax) * phptype + * </code> * * @param string $dsn Data Source Name to be parsed * - * @return array an associative array + * @return array an associative array with the following keys: + * + phptype: Database backend used in PHP (mysql, odbc etc.) + * + dbsyntax: Database used with regards to SQL syntax etc. + * + protocol: Communication protocol to use (tcp, unix etc.) + * + hostspec: Host specification (hostname[:port]) + * + database: Database to use on the DBMS server + * + username: User name for login + * + password: Password for login + * + mode: chmod mode for SQLite databases * * @author Tomas V.V.Cox <cox@idecnet.com> */

« previous php.pear.cvs (#15357) next »