Re: Re: Date-class
| From: | Erik Hjortsberg | Date: | Wed, 18 Jul 2001 12:05:00 +0000 |
| Subject: | Re: Re: Date-class | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-864@lists.php.net to get a copy of this message | ||
At 08:24 2001-07-18 +0200, you wrote:
Hello. As for naming the variables do not use plural. * $date->year() * $date->month() * $date->day() * $date->hours() * $date->minutes() * $date->seconds() You dont have variable "moths" you have "month", so use hour instead on hours and minute and second instead of minutes & seconds. And as for OO try to write methods for get&set the variables instead of accessing them directly.True and true. Although PEAR has no common way of naming mutators and accessors it is common practice in many OO-paradigms to use get* and set*. /erik hjortsberg