I've been trying to build a PDO extension, and I wanted to have special classes in different files but I wanted to have them all link to the same original class.
I have worked with some Frameworks and I see that they use the extends class
keyword, and I thought that it added the class you are making to the class
that you have given.
Some code I have tried is:
class PSMQuery extends PSM {
// Functions and Jargon
}
I tried making an object for the original PSM class:
$psm = new PSM(/*Information*/);
But when I call the $psm
variable like $psm->functionInTheExtendedClass
it comes up with an error saying that it was an undefined method when I called it.
Am I using the extends
keyword incorrectly?