phalcon/cphalcon — pull request #1657 by sjinks (2013-12-09 08:28:54+00:00)
Title: Use native iterators for Phalcon\Validation\Message\Group

* simplify `appendMessages()` by using `get_iterator()` and native iterator interface;
* implement native iterator interface (strictly speaking, this was not necessary as `Iterator` will fall back to calling userspace rewind()/current()/valid()/next() if the native interface is not implemented, but NI makes `foreach` iteration much faster).

`Phalcon\Validation\Message\Group` is used mainly as a testbed and if everything goes well, I will apply these optimizations to result sets where they will really matter.