05-03-2008, 08:50 PM
|
#9 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
Rather than re-wiring all of your classes to accept a single argument in the form of an array, you could use PHP5's Reflection API to create a new object instance with our arguments like:
PHP Code:
// Equivalent of $object = new Object(...);
$reflect = new ReflectionClass('Object');
$object = $reflect->newInstanceArgs($args);
|
|
|
|