<?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>Thu, 23 May 2013 17:11:00 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Solar Blog: Using registry_set to auto-register objects]]></title>
      <guid>http://www.phpdeveloper.org/news/11065</guid>
      <link>http://www.phpdeveloper.org/news/11065</link>
      <description><![CDATA[<p>
In <a href="http://solarphp.com/blog/read/8-using-registry-set-to-auto-register-objects">this recent post</a> from the Solar blog, <i>anttih</i> shows how to use the Solar registry to automatically load and register objects when it starts up.
</p>
<blockquote>
<a href="http://solarphp.com/class/Solar_Registry">Solar_Registry</a> is a class for storing singleton objects which are used usually for things like SQL objects and the response and request objects. Now what's interesting, is that in the new version of Solar a new configuration key registry_set was added for the <a href="http://solarphp.com/class/Solar">Solar</a> arch-class. You can use it to tell Solar to automatically add objects to the registry when it starts up.
</blockquote>
<p>
He compares the two methods - manual loading and the automatic version and includes a "real world" example of loading up an SMTP object.
</p>]]></description>
      <pubDate>Tue, 23 Sep 2008 08:47:36 -0500</pubDate>
    </item>
  </channel>
</rss>
