PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Universal Constructor Sighting aoIn The Wilda

Note: This article was originally published at Planet PHP on 9 July 2010.
Planet PHP
For those of you who don't know, aouniversal constructora 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 [...]