Re: cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests reflectionProperty_setAccesible.phpt

From: Date: Sat, 16 Feb 2008 10:54:35 +0000
Subject: Re: cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests reflectionProperty_setAccesible.phpt
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-48593@lists.php.net to get a copy of this message
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

« previous php.cvs (#48593) next »