Re: [SMARTY-DEV] foreach on iterator
| From: | boots | Date: | Sat, 19 Mar 2005 20:35:41 +0000 |
| Subject: | Re: [SMARTY-DEV] foreach on iterator | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-2671@lists.php.net to get a copy of this message | ||
Whaddya know -- I should have checked the CVS logs first...messju just
finished committing the changes to CVS so its in there, rarin' to go!
thanks messju!
xo boots
--- boots <jayboots@yahoo.com> wrote:
> --- Sean Coates <sean@caedmon.net> wrote:
> > Please read the archives.
> > http://news.php.net/php.smarty.dev/2608
> >
> > Robin Ericsson wrote:
> > > I have a class which it using SPL and implements Iterator.
> > > [..snip..]
> > > {foreach from=$iterator item=key) generates the following code:
> > >
> > > <?php if (count($_from =
> > > (array)$this->_tpl_vars['revisionIterator'])):
> > > foreach ($_from as $this->_tpl_vars['revision']):
> > > endforeach; endif; unset($_from); ?>
> > > [..snip..]
> > > ...casts the object into an array and therefore break my class.
>
> I don't think monte or messju will object to me posting this, so...
>
> To prevent another long thread on this, I'll just quickly say that
> recent discussion suggests that the condition that prevents this from
> currently working will be removed but explicit support for iterators
> is
> unlikely (at this time). In other words, the functionality won't be
> prohibited but it won't be officially supported either.
>
> I think monte or messju will likely commit the change before the next
> release or shortly afterwards. It appears that messju's final
> proposal
> will be used so if you are anxious and can't wait, go ahead and apply
> the patch yourself.
>
> xo boots
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>