Re: A question of style - Properties
| From: | Chuck Hagenbuch | Date: | Mon, 30 Apr 2001 14:48:29 +0000 |
| Subject: | Re: A question of style - Properties | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-339@lists.php.net to get a copy of this message | ||
Quoting clayton collie <ccollie@cau.edu>:
> actually my question is slightly different. in my object, i have
> "properties" that may trigger actions in the library that implements it. as
> a simple example setting $url_fetcher->url =
> "http://php.net" would load
> the page into an internal buffer. the code is written in C so, im talking
> properties in the zend "overloaded" sense of the term (for instance in the
> COM module) .
In my opinion, that should definitely be a method call; also, it's not a
get/set call, it should be loadPage() or something like that. Having a method
like that set an internal property is a perfectly reasonable side effect;
setting a property causing a page to be loaded is rather more drastic.
(unless you're talking about a property-change event, like java gives you, but
that's a rather different setup...)
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
You will receive an urgent transmission from the Martian government informing
you that Mars does not, in fact, need women, so please stop sending them.