0
created two classes a parent class that has a builder where I have to pass some arguments, and a daughter class that inherits this parent class that I created, but in the daughter class I did not make the builder and I did not use the:
parent::__construct();
But by instilling the child class of error, if I don’t pass the arguments in its header, and when I pass the arguments it works normal and I can use all methods of the parent class.
So I came to the conclusion that, there’s no need to call the father-class builder within the daughter-class, unless the daughter-class has a builder, then I would have to pass on their respective arguments and the parent-class arguments through the Rent::__Construct();.
My conclusion is correct ?
I understood, thank you, this doubt came to me here because in our system that is already old... we usually assemble the class daughters calling the constructor of the parent class this constructor is from the controller of Codeigniter. I’m doing a new project and I didn’t call the builder of the parent class because I didn’t need to modify it and it worked, then I got this doubt, really worth.
– Lucas Lima