This post originated from an RSS feed registered with PHP Buzz
by Paul M Jones.
Original Post: Universal Constructor Sighting “In The Wild”
Feed Title: Paul M. Jones
Feed URL: http://paul-m-jones.com/archives/category/programming/php/feed
Feed Description: If it's worth doing, it's worth over-doing.
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.
One [...]