Re: [RfC] Services_Weather

From: Date: Fri, 03 Oct 2003 09:20:24 +0000
Subject: Re: [RfC] Services_Weather
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22347@lists.php.net to get a copy of this message
This looks smart... I will go that way. The reason why I chose the dsninfo array was, DB has problems with SQLite because of a faulty "mode", it was just a workaround to get it set to 0644, but I can do that after parsing the dsn. Tomas V.V.Cox wrote: > Friday, October 3, 2003, 8:12:15 AM, Arnaud Limbourg wrote: > > >>Hi, > > >>The classes look great. > > >>Stuff i would change > > >>Why use multiple parameters in (Metar) > > >> function setMetarDB($dbType, $dbUser, $dbPass, $dbHost, $dbName, $dbOptions) >> { >> $dsn = >> $dbType."://".$dbUser.":".$dbPass."@".$dbHost."/".$dbName; >> $dsninfo = array( >> "phptype" => $dbType, >> "username" => $dbUser, >> "password" => $dbPass, >> "hostspec" => $dbHost, >> "database" => $dbName, >> "mode" => 0644 >> ); > > > This is wrong. The PEAR DB dsn contains much more fields than only > these. The way I'd recommend is: > > function setMetarDB($dsn) > { > $dsninfo = DB::parseDSN($dsn); > } > > It'd support array or string. >

« previous php.pear.dev (#22347) next »