I have a set of nested objects/classes. Essentially each object is a registry of its child classes, plus some unique attribute
Code:
Class A{
  public A_Attribute1= 'some value';  
  public A_Attribute2= 'some value';
  public GenAttribute= 'attribute general';
  protected content=array(); // all classB instances 
} 
Class B extends class A{
  public B_Attribute1= 'some value';  
  public B_Attribute2= 'some value';
  public GenAttribute= 'different attribute general';
  protected content=array(); // all classC instances 
} 

Class C extends class B{
  public C_Attribute1= 'some value';  
  public C_Attribute2= 'some value';
  public GenAttribute= 'Still different attribute general';
  protected content=array(); // all classD instances 
} 

Class D extends class C {
  public D_Attribute1= 'some value';  
  public D_Attribute2= 'some value';
  public GenAttribute= 'uniqu attribute general';
  protected content=array(); // some data  
}
Is there direct way to get attributes from the parent instance?

$a=new a();
and $a->content has 10 instances of class B, each of which have 5 or so instances of class C...

from inside of one of the Class C objects, can you retrieve "B_Attribute2" of the parent object(instance) of the class B object that holds it?