Re: CS discussion
| From: | Jon Parise | Date: | Tue, 15 Jul 2003 20:15:37 +0000 |
| Subject: | Re: CS discussion | ||
| References: | 1 2 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-62@lists.php.net to get a copy of this message | ||
On Tue, Jul 15, 2003 at 08:58:26PM +0200, Lukas Smith wrote:
> Hmm not sure what the best solution is there. I tend to think that even
> there it would be beneficial to use (dis)connect(). The first thing you
> might be looking for would be open()/close() however if they are absent
> I think it would be quite obvious that (dis)connect() is the method you
> want. And making this the same across all classes is cleaner, especially
> with so many PEAR classes allowing file and database access through
> containers.
If the first thing you're looking for is open() / close(), then that's
what they should be named (especially if they're accurate names).
I understand that you want to use a generic name for containers, but
think of a Cache container. It's more natural to open or close a
cache, not connect and disconnect to it. But when we're talking about
a database connection, the connect() / disconnect() pair is more
obvious.
--
Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)