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

Paul Jones' Blog:
Universal Constructor Sighting "In The Wild"
Jul 12, 2010 @ 14:56:22

In a new post to his blog Paul Jones talks about spotting something "in the wild" that he's a proponent of - a "universal constructor".

For those of you who don’t know, "universal constructor" is the name I give to PHP constructors that always and only take a single parameter. The parameter is an array of key-value pairs, which is then merged with a set of default keys and values. Finally, the array is unmarshalled, usually into object properties.

He talks about the benefits of using a constructor like this in your applications and how he's implemented it as a standard part of the Solar framework. Oh, and the sighting in the wild? It was in this MongoDB session handler.

Be sure to check out the comments for some other great opinions on this "universal constructor" idea, both for and against.

tagged: constructor universal opinion solarphp framework

Link:

Paul Jones' Blog:
Updates "Getting Started" Docs for Solar
Jan 19, 2009 @ 13:56:22

Paul Jones has a quick note on his blog today mentioning the updates recently made to the "Getting Started" documentation for the Solar PHP framework. There's five new sections as a result of the overhaul:

You can find out more about this PHP MVC framework on its site - SolarPHP.com.

tagged: gettingstarted solar framework solarphp model vendor app

Link:

Solar Blog:
Authentication using MySQL
Sep 25, 2008 @ 13:48:59

On the Solar blog there's a new post introducing you to a method for authenticating your users (of your Solar-based application) off of a MySQL database.

This entry is an extension to the current manual page for user authentication and is intended for folks who have already been through the basics of SolarPHP. What I hope to accomplish here is to show you how to setup user authentication using MySQL, something the manual currently does not elaborate upon.

He includes all of the bits you'll need to get it up and working - the code for the authentication, the configuration file setup, and the MySQL stable structure.

tagged: authentication mysql tutorial solarphp framework

Link:

Solar Blog:
Using registry_set to auto-register objects
Sep 23, 2008 @ 13: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.

tagged: solar framework solarphp registry registryset automatic object

Link:

Community News:
SolarPHP Framework Release 1.0.0alpha2
Sep 18, 2008 @ 17:05:01

The SolarPHP framework group is happy to announce the release of the latest version of the PHP rapid application development framework - SolarPHP 1.0.0 aplha 2.

We're happy to announce the release of Solar 1.0.0alpha2. After almost a year of changes and improvements, this one has been a long time in coming. You can see the download-and-installation instructions here.

Changes include updates to Solar_Auth, Solar_Cache, Solar_Sql, some schema changes, additions of some new classes like Solar_Factory, Solar_Service_Akismet and lots more. Check out this blog entry for the complete list (along with what was changed in detail).

Oh yeah, did we mention the project now has a blog? Paul Jones and crew have whipped up a blog application (written with Solar, of course) they've launched to help the community keep track of the latest from the framework. The source for the blog will be coming soon for those who are looking to see how it all works.

tagged: solarphp framework blog release blog

Link:


Trending Topics: