<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 20:12:42 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Hakre's Blog: Iterating over Multiple Iterators at Once]]></title>
      <guid>http://www.phpdeveloper.org/news/17822</guid>
      <link>http://www.phpdeveloper.org/news/17822</link>
      <description><![CDATA[<p>
In a recent post to his blog <i>Hakre</i> looks at <a href="http://hakre.wordpress.com/2012/04/05/iterating-over-multiple-iterators-at-once/">iterating over iterators</a> (multiples all at once) using either the Append Iterator or the MultipleIterator.
</p>
<blockquote>
PHP's SPL has two build-in Iterators that deal with multiple iterators at once: <a href="http://php.net/manual/en/class.appenditerator.php">AppendIterator</a> and <a href="http://php.net/manual/en/class.multipleiterator.php">MultipleIterator</a>. In this posting I'll cover both a bit.
</blockquote>
<p>
He gives some sample code for each - showing how to use the AppendIterator to combine multiple iterators into one set and using the MultipleIterator to attach (not append/merge into one set) multiple iterator objects to a single, iteratable object. He als mentions a "lost" iterator, the <a href="http://code.google.com/p/cvphplib/source/browse/trunk/cvphplib/code/DualIterator.php?r=6">DualIterator</a> that never made it out of a SVN repository and into the main codebase.
</p>]]></description>
      <pubDate>Mon, 16 Apr 2012 12:09:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPro.org: SPL AppendIterator]]></title>
      <guid>http://www.phpdeveloper.org/news/11588</guid>
      <link>http://www.phpdeveloper.org/news/11588</link>
      <description><![CDATA[<p>
On the PHPro.org website <i>Kevin Waterson</i> has posted <a href="http://www.phpro.org/tutorials/SPL-AppendIterator.html">a look at the AppendIterator</a> iterator, a part of the SPL (Standard PHP Library) that is included with PHP5.
</p>
<blockquote>
The SPL AppendIterator provides a method of iterating over multiple arrays at the same time. This can be very useful when aggregating data from different sources, such as XML or RSS feeds or even multiple database sources. The flexibility and efficiency of the whole SPL suite of tools is a the disposal of the AppendIterator making manipulating data in multiple objects fast and simple with a minimum of code.
</blockquote>
<p>
His example shows what an AppendIterator object looks like, how to use it to add new values to an array and how to filter values out of the append process with a FilterIterator object.
</p>]]></description>
      <pubDate>Wed, 17 Dec 2008 11:19:32 -0600</pubDate>
    </item>
  </channel>
</rss>
