Building an Iterator with PHP
(Page 1 of 3 )
Want to clean up you code and save hardware usage? Well it is possible thanks to Dejan's iterator technique. Read how it is done.
PHP arrays are generally a very powerful object container. But, we can easily add a little more fuel to them. Imagine an iterator object as a kind of wrapper around our arrays. What we will try to accomplish is to build a unique interface for traversing arrays and to add a little more control over how our objects are created. Finally, I'll explain how they can be used to support lazy loading.Next: Article >>
More PHP Articles
More By Dejan Bosanac