Re: [PHP] Does ReflectionMethod::setAccessible() do anything?

2010-12-20 Thread David Harkness
On Thu, Dec 16, 2010 at 6:09 PM, Nathan Nobbe wrote: > you just have to invoke the function from the context of the > ReflectionMethod instance > > class Foo { protected function bar() { echo "foobar\n"; } } > $m = new ReflectionMethod('Foo', 'bar'); > $m->setAccessible(true); > $m->invokeArgs(ne

Re: [PHP] Does ReflectionMethod::setAccessible() do anything?

2010-12-20 Thread David Harkness
On Thu, Dec 16, 2010 at 6:09 PM, Nathan Nobbe wrote: > you just have to invoke the function from the context of the > ReflectionMethod instance > > class Foo { protected function bar() { echo "foobar\n"; } } > $m = new ReflectionMethod('Foo', 'bar'); > $m->setAccessible(true); > $m->invokeArgs(ne

Re: [PHP] Does ReflectionMethod::setAccessible() do anything?

2010-12-16 Thread Nathan Nobbe
On Thu, Dec 16, 2010 at 6:37 PM, David Harkness wrote: > According to the manual page for setAccessible() [1] the feature is > available with 5.3.2, and I'm running > >5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:49:46) > > so I should be good to go. However, even the simpl

[PHP] Does ReflectionMethod::setAccessible() do anything?

2010-12-16 Thread David Harkness
According to the manual page for setAccessible() [1] the feature is available with 5.3.2, and I'm running 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:49:46) so I should be good to go. However, even the simplest test to make a protected or private method accessible fails.