You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-dev@incubator.apache.org by Jerome Renard <je...@gmail.com> on 2011/02/23 17:43:22 UTC

[zeta-dev] [patch] ezcBaseOptions should be traverseable

Related issue : https://issues.apache.org/jira/browse/ZETACOMP-39

Hi there,

you will find attached a patch for two alternatives to fix ZETACOMP-39.

Alternative 1 (alternative1.diff):
simply add a new method that return the list of available properties so
a user can fetch them and do anything he wants with it.

Alternatice 2 (alternative2.diff):
ezcBase implements Iterator so doing a simple foreach makes it possible to
loop through properties

Any feedback welcome. :)

-- 
Jérôme Renard
http://39web.fr | http://jrenard.info | http://twitter.com/jeromerenard

Re: [zeta-dev] [patch] ezcBaseOptions should be traverseable

Posted by Tobias Schlitt <to...@schlitt.info>.
On 02/23/2011 07:04 PM, Jerome Renard wrote:

> Here is a new patch implementing alternative 2 correclty (I completely
> forgot next(), current() ... functions).
> 
> The patch (alternative3.diff) is now much cleaner.

+1 on alternative3.diff.

Thanks for the contribution! :)

Cheers,
Toby

-- 
Tobias Schlitt        http://schlitt.info        GPG Key: 0xC462BC14
Want to hire me? Need quality assurance?            http://qafoo.com
eZ Components are Zeta Components now!          http://bit.ly/9S7zbn

Re: [zeta-dev] [patch] ezcBaseOptions should be traverseable

Posted by Jerome Renard <je...@gmail.com>.
All,

On Wed, Feb 23, 2011 at 6:51 PM, Gaetano Giunta <gi...@gmail.com>wrote:

> Jerome Renard wrote:
>
>> Related issue : https://issues.apache.org/jira/browse/ZETACOMP-39
>> [...]
>>
>> Alternative 2 (alternative2.diff):
>>
>> ezcBase implements Iterator so doing a simple foreach makes it possible to
>> loop through properties
>>
>>
Here is a new patch implementing alternative 2 correclty (I completely
forgot next(), current() ... functions).

The patch (alternative3.diff) is now much cleaner.

-- 
Jérôme Renard
http://39web.fr | http://jrenard.info | http://twitter.com/jeromerenard

Re: [zeta-dev] [patch] ezcBaseOptions should be traverseable

Posted by Gaetano Giunta <gi...@gmail.com>.
Jerome Renard wrote:
> Related issue : https://issues.apache.org/jira/browse/ZETACOMP-39
>
> Hi there,
>
> you will find attached a patch for two alternatives to fix ZETACOMP-39.
>
> Alternative 1 (alternative1.diff):
> simply add a new method that return the list of available properties so
> a user can fetch them and do anything he wants with it.
>
> Alternative 2 (alternative2.diff):
> ezcBase implements Iterator so doing a simple foreach makes it possible to
> loop through properties
>
> Any feedback welcome. :)
+1 iterator
>
> -- 
> Jérôme Renard
> http://39web.fr | http://jrenard.info | http://twitter.com/jeromerenard
>