Re: New PDO-based DBAL/ORM for PEAR2
| From: | Bertrand Mansion | Date: | Wed, 21 Nov 2007 19:21:36 +0000 |
| Subject: | Re: New PDO-based DBAL/ORM for PEAR2 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-48560@lists.php.net to get a copy of this message | ||
Le 21 nov. 07 à 19:22, Michael J. I. Jackson a écrit :
On Nov 21, 2007, at 10:29 AM, Bertrand Mansion wrote:Sounds good. I didn't know about this feature :) -- Bertrand Mansion Mamasam Work : http://www.mamasam.com Blog : http://golgote.freeflux.netLe 21 nov. 07 à 17:24, Michael J. I. Jackson a écrit :I agree it's easier. But I just remembered something: PDO already lets you use aliases in place of a DSN! The only downside is that you have to set them up in your php.ini. And since the parameters passed to PDORM::factory() are passed directly to the PDO constructor, those will still work. Do you think this is a reasonable alternative?So I can either manage a list of connection aliases in my head, or I can let PDORM do it for me and just use PDORM::singleton(). I personally think the latter is easier and requires less work on my part.That's personal I guess, since I find it easier to remember an alias like 'db1' or 'db2' than my password :)