Re: Merging PHPLIB into PEAR

From: Date: Fri, 19 Jan 2001 22:51:31 +0000
Subject: Re: Merging PHPLIB into PEAR
References: 1 2  Groups: php.pear 
Request: Send a blank email to php-pear+get-1107@lists.php.net to get a copy of this message
Kristian Koehntopp wrote: > > On Fri, Jan 19, 2001 at 11:53:53AM -0500, Chuck Hagenbuch wrote: > > > Yes, if you mean that methods of PHPLib classes are > > > underscore with _ as delimiters in names, not java-style > > > PEAR class methods names. > > > No, I mean that instead of having a Session:: class with a > > factory method (Session::factory()) that creates objects of > > any session type, saving you from hardcoding class names, > > there is CT_sql, CT_foo, CT_bar, and you need to subclass one > > of them and specify that name somewhere in your app to use it > > - and none of them are related to the Session class, which > > they could inherit from. > > This is what I called impedance mismatch between PEAR and PHPLIB > in a previous mail. PEAR parametrizes, for example by > specifiying database connect parameters as parameters to the > constructor (if I am not mistaken). Actually, you are mistaken, DB uses a factory pattern. The only stuff that goes on in DB's constructors is some variable initialization (since you can't nicely report failures from constructors, I avoid doing things that can go wrong in them). You're right about the "impedance mismatch" though. - Stig

« previous php.pear (#1107) next »