This is my first post here so hi all.
Environment PHP5
I am having difficulties working out the best way to access properties when my objects are within objects. I'll try to explain clearly.
Class A - has a property $this->value = "Hello World";
Class B is instantiated in Class A
Class C is instantiated in Class B
B and C do not and cannot extend A
In class C I wish to access $value from Class A.
The only way I can seem to do this atm is by passing the whole of class A as an object into Class C which ofc seems stupid, and I don't want to use global.
I'm sure I'm missing something obvious so any and all help appreciated.