Newsgroups: php.i18n,php.internals Path: news.php.net Xref: news.php.net php.i18n:1017 php.internals:24202 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6304 invoked by uid 1010); 23 Jun 2006 21:21:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 6276 invoked from network); 23 Jun 2006 21:21:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2006 21:21:25 -0000 X-PHP-List-Original-Sender: andrei@gravitonic.com X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from ([204.11.219.139:42772] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 03/21-02438-35B5C944 for ; Fri, 23 Jun 2006 17:21:25 -0400 Received: from [66.228.175.145] (borndress-lm.corp.yahoo.com [66.228.175.145]) (authenticated bits=0) by lerdorf.com (8.13.7/8.13.7/Debian-1) with ESMTP id k5NLLKGU004664; Fri, 23 Jun 2006 14:21:21 -0700 In-Reply-To: <449C5A1A.3080407@php.net> References: <23ead5a35bff30e24f93045de3db6638@gravitonic.com> <449C5A1A.3080407@php.net> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: Content-Transfer-Encoding: 7bit Cc: php-i18n@lists.php.net, internals@lists.php.net Date: Fri, 23 Jun 2006 14:20:28 -0700 To: Michael Wallner X-Mailer: Apple Mail (2.623) Subject: Re: [PHP-DEV] Re: TextIterator changes From: andrei@gravitonic.com (Andrei Zmievski) TextIterator does not implement Iterator interface, only Traversable. It just happens to have functions of the same name as Iterator. -Andrei On Jun 23, 2006, at 2:16 PM, Michael Wallner wrote: > Andrei Zmievski wrote: >> I am working on implementing BreakIterator API [1]. I considered two >> approaches: making a separate class or merging the API into the >> existing TextIterator. Having a separate class would be a bit >> cleaner, but I can see people wanting to use it in foreach(), and >> since TextIterator already provides a lot of BreakIterator's >> functionality, I decided that merging would be the best option. >> However, there is an overlap between the BreakIterator API and the >> current TextIterator one, so there will have to be some changes. >> 1. TextIterator::current() signature will change from: >> mixed current() >> to: >> mixed current(integer &$offset) > > This will raise the same issue as we have/had with the reflection API: > mike@honeybadger:~/build/php-unicode-debug$ cli -r 'interface > i{function f();} class c implements i{function f($a){}}' > > Fatal error: Declaration of c::f() must be compatible with that of > i::f() in Command line code on line 1 > > > Nah, don't look at me--I don't like that either. > > >> 3. TextIterator::rewind() will be renamed to TextIterator::first() to >> conform to BreakIterator's first()/last() API. >> So this is heads up. Let me know if you have a problem with this. > > Huh? Rename or alias? It can't implement Iterator if there's no > rewind() method. > > Regards, > -- > Michael > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php