Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17177 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24631 invoked by uid 1010); 7 Jul 2005 23:57:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 24615 invoked from network); 7 Jul 2005 23:57:05 -0000 Received: from unknown (HELO zend.com) (127.0.0.1) by localhost with SMTP; 7 Jul 2005 23:57:05 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:53438] helo=mail.zend.com) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id 8E/6E-59389-E41CDC24 for ; Thu, 07 Jul 2005 19:57:05 -0400 Received: (qmail 7064 invoked from network); 7 Jul 2005 23:56:55 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 7 Jul 2005 23:56:55 -0000 Message-ID: <5.1.0.14.2.20050707164528.02833cc0@localhost> X-Sender: andi@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 07 Jul 2005 16:56:51 -0700 To: Derick Rethans Cc: internals@lists.php.net In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] date/timezone classes From: andi@zend.com (Andi Gutmans) References: Hey Derick, If you're just wrapping the date type with a class, I don't see why it shouldn't be a resource. It'd give you the same thing but would be easier to implement (unless I'm missing something). I realize you personally aren't fond of OO but it actually would work very nicely with a Date class. I'm not talking about OO as in over-architecting and having a huge hierarchy but just having easy to use methods on the Date/TimeZone classes (one simple level). It would look the following: $timeZone->getName(); vs. date_timezone_get($date); $date->getOffset(); vs. date_offset_get($date); Personally, unrelated to OO I think it's a nicer and cleaner way of exposing such an API. It would also make it easier for some of the other new extensions like SimpleXML, SOAP, PDO , etc. to take advantage of it when exposing data types. I think this should be seriously considered. I'll be happy to work with you on this if it makes sense to you and others. I think that this functionality is best to be developed in parallel to 5.1. As it would be new unrelated functionality, I think we could introduce it in 5.1.x after 5.1.0 is out and once everyone feels comfortable with it. I don't think rushing it into 5.1.0 is a good idea especially if my feedback is considered. Andi At 11:10 PM 7/7/2005 +0200, you wrote: >Hei, > >I wrote up a little document about how I want to implement the date and >timezone "class"es - although I'm not planning any OO methods. I'm just >wrapping the timelib_time and timelib_tzinfo structures in an >object. Let me know what you think. > >Derick >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php