News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Solar Blog:
Using registry_set to auto-register objects
September 23, 2008 @ 08:47:36

In this recent post from the Solar blog, anttih shows how to use the Solar registry to automatically load and register objects when it starts up.

Solar_Registry 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 Solar arch-class. You can use it to tell Solar to automatically add objects to the registry when it starts up.

He compares the two methods - manual loading and the automatic version and includes a "real world" example of loading up an SMTP object.

0 comments voice your opinion now!
solar framework solarphp registry registryset automatic object


blog comments powered by Disqus

Similar Posts

NETTUTS.com: CodeIgniter From Scratch: Day 5 – CRUD

Jani Hartikainen's Blog: Using models as criteria objects for querying the database

International PHP Magazine: Poll: Which is your favorite trick in running Symfony with Subversion?

EllisLabs Blog: EllisLab moves to Mercurial, Assembla, BitBucket; CodeIgniter 2.0 Baking

Daniel Vecchiato's Blog: Using Zend Framework components in Code Igniter


Community Events

Don't see your event here?
Let us know!


symfony2 voicesoftheelephpant conference series podcast performance php7 community extension version interview api laravel introduction framework install example library release opinion

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework