here is the class structure. I want Observer:callme() to be callable from Children too.
class Observer
{
protected callme()
{
}
}
class Parent exten
protected
means that you can call that method only from the same class and from subclasses. What you want to do is not possible. The protected
keyword would be pointless if you could call these methods from everywhere.
In C++ there is the friend
keyword to achieve what you want: you could define Child as friend
of Observer (this has to be done from within Observer), and then you can call all methods in Observer (including private and protected) from within methods of Child. But such a keyword does not exist for PHP.