I am officially mentally retarded. [Let me explain]
I have never given lessons and their relationship until today. I'm trying to understand something that seems pretty obvious, but since I'm stupid, I don't see it.
Let's say I have a base class that will be extended from different files. How classes of children can invoke functions from other siblings (that is, if they are considered children at all). Code example: (don't kill me)
class cOne {
public function functionOne(){
echo "something";
}
}
Then in another file I say:
class cOneChildOne extends cOne {
public function functionOne(){
echo "something from child one";
}
}
And in another file I say:
class cOneChildTwo extends cOne {
public function functionOne(){
echo "something from child two";
}
}
How can I create a new object, and when I can access the functions from both the children and the parent class in a similar style $newObject->Children->function();, I seriously consider the option, today I lost my brain and I canβt think straight.
, , - , : $newObject = new cOne; , -, .
- , .
, , .
!!