<?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>Fri, 09 Jan 2009 21:54:59 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Havard Eide's Blog:  Countable]]></title>
      <guid>http://www.phpdeveloper.org/news/10739</guid>
      <link>http://www.phpdeveloper.org/news/10739</link>
      <description><![CDATA[<p>
In a <a href="http://eide.org/2008/07/30/countable/">new post</a> <i>Havard Eide</i> looks at the creation of a Countable interface that can be used in any application:
</p>
<blockquote>
Today I will look at the Countable interface, it has a single function that needs to be implemented: count(), by implementing this you can ensure that there is a count() function ready to use on any given class that implements it. The Countable interface is used in other places in the SPL as well: the ArrayIterator and ArrayObject classes implements this interface ( and SqliteResult if present ).
</blockquote>
<p>
In his code examples he shows simple methods for returning the count() of a property, but notes that the real power of it comes in the ability to manipulate the number returned from the call based on other parameters (or filtering).
</p>]]></description>
      <pubDate>Fri, 01 Aug 2008 10:23:28 -0500</pubDate>
    </item>
  </channel>
</rss>
