<?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>Sun, 19 May 2013 18:48:18 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHP-Tip-a-Day: PHP Tutorial: The Legend of the Singleton]]></title>
      <guid>http://www.phpdeveloper.org/news/18087</guid>
      <link>http://www.phpdeveloper.org/news/18087</link>
      <description><![CDATA[<p>
Following his <a href="http://phpdeveloper.org/news/18081">recent allegory</a> about the Factory pattern (as described in story form) <i>Greg Bulmash</i> has posted <a href="http://www.php-tip-a-day.com/php-tutorial-the-legend-of-the-singleton/">the Legend of the Singleton</a> to help with your understanding this pattern.
</p>
<p>
The <a href="http://en.wikipedia.org/wiki/Singleton_pattern">Singleton pattern</a>  provides an interface to let your application always pull out the same object (or make a new one if it needs to).
</p>
<p>
<a href="http://www.php-tip-a-day.com/php-tutorial-the-legend-of-the-singleton/">His legend</a> talks about kings, mythological data sources and the overloading of multiple "hoses" (connections) to it. Also included is a code example showing a simple database class that includes a "getInstance" method acting as the Singleton to return either a new or the (same) current instance.
</p>
]]></description>
      <pubDate>Wed, 13 Jun 2012 09:02:36 -0500</pubDate>
    </item>
  </channel>
</rss>
