I realize this is super-old, but in case anyone else needs a clue...
Have you considered using static variables?
The PHP OOP design pattern is such that statically declared variables in a parent class remain the same in the child class, too.
For example...
<?php
class A {
public static $test = 'a';
public function test() {
echo 'Test is: '.self::$test;
}
}
class B extends A {
public static $test = 'b';
}
$obj = new B;
$obj->test();
?>
Running this code (on PHP 5.3- I'm sure it's the same for other versions, too) will give you the following result:
Test is: a
From what I could gather in your OP, you are looking for a way for the parent class variables to remain - even in extended classes. This solves that problem.
To call the variables publicly outside of the class scope (i.e. where you'd normally write $obj->vars), you'd need to create a function in the parent class that references self::$variable_name
so that it can throw that variable back to the code that utilizes either that class, or any other class that extends it.
For example, something like:
public function get_variable() {
return self::$variable;
}
You could also create a magic method that would dynamically throw back the self::$variable based on what you ask the instance for - i.e. a method or a variable. You could wire the code to throw back the self::$variable equivalent in any case.
Read http://php.net/manual/en/language.oop5.magic.php for more info on the various magic methods that allow you to do this kind of stuff.
The OP was a bit cryptic so I wasn't sure if that's exactly what you wanted, but I didn't see anyone else here reference static variables so thought I'd chime in - hope it helps!