Getting list of sub and super class member variables

On my project, I need to collect the member variables of the classes that I am working on.
But, since, the classes have common member variables like date_created and date_modified and others, I have Abstract class for those member variables and their setters and getters
I have been using get_class_vars for such cases, but I want to call this from the parent and be able to access the member variables at run time. which was a problem, it would collect only the parent member variables:

        $classProperties = array();
        $classProperties['vars'] = get_class_vars(get_class($this));

But this hasn’t work.
Then I used the reflection method:

        $child_reflection = new ReflectionClass($this);
        $child_properties = $child_reflection->getdefaultProperties();
        $parent_reflection = new ReflectionClass(__CLASS__);
        $parent_properties = $parent_reflection->getdefaultProperties();
        $class_properties['vars'] = array_merge($child_properties
, $parent_properties);

This would give all properties for the class. In this case it should be up to the developer to limit the access and manipulate the use of the properties not to loose the semantics of having them :-)

d i s   i z – IT!