PECL and Class Organization
| From: | l0t3k | Date: | Thu, 07 Nov 2002 14:51:57 +0000 |
| Subject: | PECL and Class Organization | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-10544@lists.php.net to get a copy of this message | ||
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