<?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>Wed, 19 Jun 2013 10:00:47 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Jordi Boggiano's Blog: Multiton base class]]></title>
      <guid>http://www.phpdeveloper.org/news/11641</guid>
      <link>http://www.phpdeveloper.org/news/11641</link>
      <description><![CDATA[<p>
In <a href="http://seld.be/notes/multiton-base-class">this recent post</a> <i>Jordi Boggiano</i> looks at a different sort of design pattern - a sort of extension of the Singleton pattern: Multition.
</p>
<blockquote>
While I like the <a href="http://en.wikipedia.org/wiki/Singleton_pattern">Singleton</a> pattern every now and then, I prefer the flexibility that the <a href="http://en.wikipedia.org/wiki/Multiton">Multiton</a> potentially offers, and well it's just an extended version of the Singleton, so it's "compatible" with the Singleton model. Anyway, to the point, PHP5.3 is coming, and with Late Static Binding you can do a base Multiton (or Singleton if you insist), which wasn't possible before. Now I like this very much because you can simply extend it rather than rewriting those (few, I know, but still) lines each time. 
</blockquote>
<p>
Included in <a href="http://seld.be/notes/multiton-base-class">the post</a> is an example of the design pattern showing how to create its structure in the class and use it to grab the same or unique instances (defined with an ID).
</p>]]></description>
      <pubDate>Tue, 30 Dec 2008 11:17:49 -0600</pubDate>
    </item>
  </channel>
</rss>
