Re: [PHP-PEAR] RFC on merge of PHPLib and Pear

[email protected] (Chuck Hagenbuch) Thu, 8 Mar 2001 10:07:58 -0500
Newsgroups php.pear
Message-ID <[email protected]>
Quoting Björn Schotte <[email protected]>:

> Chuck, of course you can set the parameters manually after
> instantiating the object (seems you really haven't dealed
> with PHPLIB seriously?):

Please read my messages. I said that you can do it by manually setting the 
parameters, but that doing so is ugly.

> See above, you have runtime configuration. But, repeating again,
> PHPLIB's nature is subclassing. If you want config files with
> $PARAMS["db_host"] = "localhost", then use $db->Host = $PARAMS["db_host"]
> from the above example or use another system. Chuck's argumentation
> seems to me a little bit weird: if a class foobar only supports
> an API with a defined way of how to configure it, you can't say
> "But I want that in _my_ config way!". Would be the same as if I
> would write "Hey, I don't want to give my datas over the XMLRPC
> interface to this class, I want that the class pulls the datas
> from outside my car!".

No.

We have designs A and B, and methods of setting parameters X and Y. Design A 
lets you use method X. Design B lets you use method X or method Y. I'm not sure 
where the car comes in.

There is no tradeoff, there is no forcing on you a paradigm that you don't 
want. If you want to subclass PEAR's db classes, you can do so. You can set all 
of the parameters by doing so.

-chuck

--
Charles Hagenbuch, <[email protected]>
"Live, from Washington, where the doctors were telling us what they did, and
 did not, do with Vice President Cheney." -Dan Rather