<?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>Sat, 05 Jul 2008 05:58:05 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Builder.com.au: How do I...recursively scan directories with PHP's DirectoryIterators?]]></title>
      <guid>http://www.phpdeveloper.org/news/10430</guid>
      <link>http://www.phpdeveloper.org/news/10430</link>
      <description><![CDATA[<p>
Builder.com.au has a <a href="http://www.builderau.com.au/program/php/soa/How-do-I-recursively-scan-directories-with-PHP-s-DirectoryIterators-/0,339028448,339289935,00.htm?feed=rss">new tutorial</a> posted today talking about the use if Iterators (from PHP's SPL) to recurse down through directories on your local drive.
</p>
<blockquote>
One of PHP5's most interesting new features is the addition of Iterators, a collection of ready-made interfaces designed to help in navigating and processing hierarchical data structures. These Iterators significantly reduce the amount of code required to process an XML document tree or a file collection.
</blockquote>
<p>
They give three examples - two basic ones showing a simple use of the DirectoryIterator and RecursiveDirectoryIterator and another slightly more complex one showing how to get information from the recursive iteration as it goes down.
</p>]]></description>
      <pubDate>Wed, 18 Jun 2008 07:55:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer Tutorials Blog: Iterating PHP objects, and readable code too!]]></title>
      <guid>http://www.phpdeveloper.org/news/10124</guid>
      <link>http://www.phpdeveloper.org/news/10124</link>
      <description><![CDATA[<p>
The Developer Tutorials blog has a <a href="http://www.developertutorials.com/blog/php/iterating-php-objects-spl-iterato-150/">recent post</a> that talks about manipulating objects in PHP with the help of the iterators that the Standard PHP Library has to offer.
</p>
<blockquote>
It's a generally accepted fact that more readable code is more maintainable and easier for other developers to pick up. [...] Today I'm going to take a look at object iteration, most commonly found in the Standard PHP Library, and explore using the Iterator interface to simplify looping.
</blockquote>
<p>
<a href="http://www.developertutorials.com/blog/php/iterating-php-objects-spl-iterato-150/">The main part</a> of the tutorial shows how to implement the Iterator interface of the SPL to create your own custom methods, theirs being a Database version with methodsfor rewinding, reading and getting the current record you're working with.
</p>]]></description>
      <pubDate>Tue, 06 May 2008 14:34:58 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[IBM developerWorks: Five more PHP design patterns]]></title>
      <guid>http://www.phpdeveloper.org/news/9875</guid>
      <link>http://www.phpdeveloper.org/news/9875</link>
      <description><![CDATA[<p>
The IBM developerWorks site has a <a href="http://www.ibm.com/developerworks/opensource/library/os-php-designpatterns/index.html?ca=drs-tp1308">new article</a> posted that talks about design patterns, five of them in particular, that can help to "accelerate your PHP development" and make your code more maintainable down the line.
</p>
<blockquote>
As an application developer, you can have a lifelong career without ever knowing what any of the patterns are called or how or when they're used. However, I've found that a good working knowledge of these patterns, as well as those introduced in the developerWorks article "Five common PHP design patterns" (see <a href="http://www.ibm.com/developerworks/opensource/library/os-php-designpatterns/index.html?ca=drs-tp1308#resources">Resources</a>), allows you to do two things: Enable high-bandwidth conversations and reduce painful lessons.
</blockquote>
<p>
The patterns they talk about in this "five more" article of the series are:
</p>
<ul>
<li>Adapter Pattern
<li>Iterator Pattern
<li>Decorator Pattern
<li>Delegate Pattern
<li>State Pattern
</ul>
<p>
Diagrams are provided for each of them, showing how they flow along with brief code examples (structures really) to show how that transitions over to actual use.
</p>]]></description>
      <pubDate>Fri, 28 Mar 2008 08:49:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[phpRiot.com: Using the PHP 5 Iterator interface with Smarty]]></title>
      <guid>http://www.phpdeveloper.org/news/9765</guid>
      <link>http://www.phpdeveloper.org/news/9765</link>
      <description><![CDATA[<p>
On the phpRiot blog, <i>Quentin Zervaas</i> has <a href="http://www.phpriot.com/blog/php5-iterator-interface-with-smarty">posted a quick tutorial</a> about using the Iterator interface (part of the Standard PHP Library) together with Smarty to loop through some objects:
</p>
<blockquote>
The PHP 5 Iterator interface is very useful for defining custom behaviour for looping over objects, however I just noticed that looping over such objects in Smarty will not work correctly. Smarty will in fact cast an object back to an array.
</blockquote>
<p>
He includes code examples of his problem to illustrate and shows how he got around the problem - a getData() function he defined that just returns the array from the object.
</p>]]></description>
      <pubDate>Mon, 10 Mar 2008 09:35:00 -0500</pubDate>
    </item>
  </channel>
</rss>
