News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Engine Yard Blog:
The Outer Iterator
January 13, 2014 @ 11:45:08

On the Engine Yard blog they have a new tutorial posted by Cal Evans looking at an object offered by the Standard PHP Library - the OuterIterator.

When PHP 5 arrived there was great excitement and rejoicing over the new object model. For many of us who struggled through PHP 4′s "Object Based" paradigm, PHP 5 was a ray of sunshine. We were so excited that many of us lost sight of another important addition to PHP 5, the Standard PHP Library (SPL).

Since then, the excitement over the object model has died down. Many authors and speakers have talked about, blogged about, and written about the SPL. However the SPL itself is a very large topic. We are going to narrow our focus down a bit to a subtopic of a specific section of the SPL. This blog post will deal with the OuterIterator. This is an interface defined in the SPL and used by several of the built in iterators.

He goes on to give a brief introduction about what the OuterIterator is and some examples uses for it, including one of the easier to follow - using it with a FilterIterator-based class. He gets into more detail about how the OuterIterator works and includes example snippets to help clarify. His "DwarfPrinter" class extends the FilterIterator and echoes out the names of The Seven Dwarves. He also includes an example of the output showing a more formatted output that follows the nesting and execution of the iterator. He finishes off the post with a list of iterators are useful to pair with the OuterIteator.

0 comments voice your opinion now!
outeriterator tutorial filteriterator standardphplibrary spl

Link: https://blog.engineyard.com/2014/the-outer-iterator

blog comments powered by Disqus

Similar Posts

Rob Allen's Blog: Tutorial Notes - Zend_Auth in French & Using Oracle

James Morris: PHPUnit Mocking and Method Chaining

Christopher Jones' Blog: Upgrade PHP with Oracle Application Server on Linux

PHPFreaks.com: Sessions and cookies: Adding state to a stateless protocol

Lorna Mitchell's Blog: PHP 5.4 Built In Webserver


Community Events





Don't see your event here?
Let us know!


symfony laravel developer podcast application list wordpress community release language unittest introduction library threedevsandamaybe series install code api interview configure

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework