`traverseRoles` gives you an iterator. Why is the method not called `rolesToIterator` or something similar then?
`traverseRoles` seems to actually walk through them here, and that's misleading when you are not doing that.

@bakura10 `iterator_to_array` can only be optimized if the iterator is a PHP internal data structure.