Hi, On Fri, 2008-02-15 at 12:37 +0000, "Derick Rethans" wrote: > derick Fri Feb 15 12:37:38 2008 UTC > > Added files: > /php-src/ext/reflection/tests reflectionProperty_setAccesible.phpt > > Modified files: > /php-src/ext/reflection php_reflection.c > Log: > - Add the ReflectionProperty::setAccesible() method that allows non-public > property's values to be read through ::getValue().
Won't it make sense to do the same for ReflectionClass (at least its newInstanceArgs() method), too? This would help with "factories" like: <?php abstract class Factory { abstract protected function __construct(); public static function factory() { $rc = new ReflectionClass(get_called_class()); return $rc->newInstanceArgs(func_get_args()); } } class Foo extends factory { protected function __construct() {}} var_dump(Foo::factory()); ?> Anybody has time&motivation? :-) johannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php