I understand that I should make a method "protected" when I want it to be only available to all classes that extend the current class as well as the current class.
Okay, grandChildClass::method2() should be protected since grandchild is extended from child.
But what should it be if accessed from a parent class such as parentClass::method2()?
class parentClass
{
public function method1() {$this->method2();}
}
class childClass extends parentClass
{
protected function method2() {}
}
class grandChildClass extends childClass
{
public function method3() {$this->method2();}
}