Using `ReflectionObject` instead of `ReflectionClass` should be enough to solve the problem without having to use `get_object_vars()`.

To be honest I just learned about that thanks to you: http://stackoverflow.com/questions/4914376/failed-to-get-dynamic-instance-variables-via-phps-reflection