dluc/Select — comment on commit c12294859940804e84019b0dcdeff949ef82fce2
File: lib/select.php line 261
By klaussantana:

Did you ever tryed something like:

$class_reflector = new ReflectionClass($class);

if ( $class_reflector->isInstantiable() )
{
return $class_reflector->newInstanceArgs( $p );
}
else
{
throw new Select_InvalidClass_Exception('It was not possible to instantiate the desired class.');
}

Or something like this...

This way you will never have to worry about how many parameters you can use when building a class to use in this kind of pattern...