Re: [SMARTY-DEV] RE: [SMARTY] php5 Iterators.
[email protected] ("Mark Rogers")
| Newsgroups | php.smarty.dev |
|---|---|
| Organization | Quarella Ltd |
| Message-ID | <00a401c501f9$c7976740$1100000a@mark> |
Boots writes:
> My point is that the current compiler isn't really well suited to spit
> out different code for different targets. If the compiler were a bit
> more plugable it would be far easier to swallow since only code
> appropriate for your platform would be loaded. As it is, I suspect that
> this will only add further bloat to good 'ol foreach which is already a
> little overworked. I'm not against it, I'm just suggesting that it may
> make sense to keep the PHP4 and PHP5 features more separated.
{iterate}?
We already have {section} and {foreach}, which are substantially similar and
which essentially perform the same task on different types of array. Whilst
I'm not convinced this is necessarily a good thing, it is the status quo and
{iterate} is more in keeping with what's there now. Or perhaps {foreach
mode=iterate}, which has the benefit of not declaring a new tag (I can see
{iterate} being used already by some Smarty users).
--
Mark Rogers,
More Solutions Ltd