Tell me if I'm correct on this..
I have a parent class called Email.. the constructor is
I have a child class EmailCar extends Email.. its constructor is
This should work fine.
Q1. According to the documentation, if I don't have a constuctor in my child class, it will use the parents constuctor. Therefore, I don't need my EmailCar constructor unless I want to initialze other variables that only apply to the EmailCar class. Right?
Q2. If I understand the docs right, you can only have one "generation".. that is, many children but no grandkids. Meaning, I could never have class EmailCarRed extends EmailCar correct?
-Dustin
Rom 8:28
I have a parent class called Email.. the constructor is
Code:
Email($to=null,$from=null,$subject=null,$body=null)
I have a child class EmailCar extends Email.. its constructor is
Code:
function EmailCar($to=null,$from=null,$subject=null,$body=null) {
$this->Email($to,$from,$subject,$body);
}
This should work fine.
Q1. According to the documentation, if I don't have a constuctor in my child class, it will use the parents constuctor. Therefore, I don't need my EmailCar constructor unless I want to initialze other variables that only apply to the EmailCar class. Right?
Q2. If I understand the docs right, you can only have one "generation".. that is, many children but no grandkids. Meaning, I could never have class EmailCarRed extends EmailCar correct?
-Dustin
Rom 8:28