zendframework/zf2 — pull request #5231 by bakura10 (2013-10-05 17:34:00+00:00)
Title: [ZF3] Rbac component cleaning

ping @spiffyjr

Another PR for ZF3 as I have lot of time today :) !

This one could have been included in ZF2 but I think it would make a very very small BC so here it is. This component is pretty small and has nearly not evolved in ZF2 as it is nearly perfect (nice work @spiffyjr!):

* Rbac component no longer extends AbstractIterator. In fact while workign on my InputFilter refacotr, I realized that implementing IteratorAggregate is MUCH faster than implementing all the iterator methods. Furthermore, it does not make a lot of sense for Rbac component to implement RecursiveIterator (in fact, the roles are iterated).
* Roles no longer implement RecursiveIteraotr, but only the simpler IteratorAggregate that returns a RecursiveArrayIterator.
* Variable "children" in rbac was renamed to "roles" to better inforce what it does.

Side note: it's not useful to create custom RecursiveIterator implementation unless you have specific and custom needs for the getChildren class.

All tests pass.