Re: PECL and Class Organization
| From: | l0t3k | Date: | Thu, 07 Nov 2002 15:14:01 +0000 |
| Subject: | Re: PECL and Class Organization | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-10549@lists.php.net to get a copy of this message | ||
answering myself...
i looked at the PEAR CVS and noticed that the current implementation is
nested. i guess i can follow that convention....
"L0t3k" <cshmoove@hotmail.com> wrote in message
news:20021107145157.99469.qmail@pb1.pair.com...
> i had a little time and a few braincells to spare, so i ventured to do
some
> extension programming. given that i intend to submit it to PECL, i had
some
> questions about organization.
> the project aims to implement PHP classes feature (if not interface)
> compatible java.util.date/timezone/calendar etc. the question, however, i
> how should the classes be organized. for instance, take the calendar
classes
> GregorianCalendar (extends Calendar)
> HebrewCalendar & IslamicCalendar(extend Calendar)
> BuddhistCalendar (extends Gregorian)
>
> so, how would we structure this :
> a) Flat
> $tz = new TimeZone("EST");
> $cal = new GregorianCalendar($timestamp, $tz);
> b) Nested
> $tz = new Date::TimeZone("EST");
> $greg = new Date::Calendar::Gregorian($timestamp,$tz);
> III) ???
>
> l0t3k
>
>
>
>