Create a new custom model with the above functions that extends the CodeIgniter Model. Then in all of your other models, you will extend this new custom model instead of extending the CodeIgniter model. Your models will inherit the methods from the custom model as well as the CodeIgniter Model.