PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
class someClass{
function someClass(){
$obj = new otherClass();
$obj->doSomething();
}
}
class otherClass{
function doSomething(){
$this->source = //Some way to find out where this was called from
}
}
I know I could pass the doSomething method a variable with $this in it... is there any way for the method to know AUTOMATICALLY though?