Is there a way for a class called inside another to know the name of the outer class?
Example:
class A{
// need to get the name of B
// some stuff
}
class B{
$var = new A;
}
get_parent_class() qon't do the work since B is not a child of A.
Any suggestions?
Edit: Sorry everyone I had to change the question. What I wanted to ask is can class A know the name of the class in which it is being called. Again sorry for idiotic first question.