0

First disclaimer - I have inhered project, and there is a lot of legacy code which I can't delete (I can delete it, but then I will need to spend few months to write everything from scratch). I extended all the models with custom MY_Model (it is extending the core) which have save function. Also most of old models have save function. My question is this:

How can I call the save function from MY_Model, and not from the class that is extending MY_Model? Is it possible?

Sasha
  • 8,521
  • 23
  • 91
  • 174

1 Answers1

0

I am unsure about the implementation but when you want to call a static function in current class not the class that extends it you can use :-

self::save();

See it elaborated in https://stackoverflow.com/a/1189663/2489860

Community
  • 1
  • 1
Samosa
  • 845
  • 7
  • 19