referring to a containing object...
Posted: Thu Mar 15, 2007 1:59 am
Hey everyone,
Maybe it's just because it's 3am (or I'm low on caffeine...) but for the life of me I can't seems to figure this out:
I know the example doesn't make a huge amount of sense, but it does in practice (I promise!)
Thanks!
Maybe it's just because it's 3am (or I'm low on caffeine...) but for the life of me I can't seems to figure this out:
I know the example doesn't make a huge amount of sense, but it does in practice (I promise!)
Code: Select all
$thing = new Thing; // I have a thing
$thing->var = new Thing; // the thing contains a thing
$copyOfThing = $thing->var->returnOuterThing(); // I want a reference to $thing returned here
class Thing{
function returnOuterThing(){
//..... ???????
}
}