I have a thing which I thought should work, but it doesn’t.
I have several Controller_## classes, they all extend from Controller_Core. Each Controller_##-class has a public function Save(). Now I figured that I want to perform some other general checking (addslashes for each $_POST-var) and thought if I add a public function Save() to the Controller_Core it would be executed by default because the ##-class extends from it. However, this is not the case.
My question; is it possible what I’m trying to achieve? Or am I mistaken by thinking this would ever work?
Call
parent::Save()in the subclass version of the method.See http://php.net/manual/en/keyword.parent.php .