Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use native iterators for Phalcon\Validation\Message\Group #1657

Merged
merged 2 commits into from Dec 9, 2013
Merged

Use native iterators for Phalcon\Validation\Message\Group #1657

merged 2 commits into from Dec 9, 2013

Conversation

ghost
Copy link

@ghost ghost commented Dec 9, 2013

  • 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.

phalcon pushed a commit that referenced this pull request Dec 9, 2013
Use native iterators for Phalcon\Validation\Message\Group
@phalcon phalcon merged commit e94bfed into phalcon:1.3.0 Dec 9, 2013
@ghost ghost deleted the group_iterator branch December 10, 2013 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants