Welcome Guest, Not a member yet? Register   Sign In
How to extend Ion_auth
#1

Hello

Which is the correct way to extend a third_party library / model ?

In particular, I need to modify some existing functions in original library / model, or add new ones.

But without modify the originals PHP files...

Example: how to extend Ion_auth libary or Ion_auth_model...

Thanks
Reply
#2

I renamed the original model to Ion_auth_b_model.php
After that, I created a new model named Ion_auth_model.php
This model starts with the following code:
PHP Code:
require_once APPPATH 'models/Ion_auth_b_model.php';
class 
Ion_auth_model extends Ion_auth_b_model
{
 
   public function __construct()
 
   {
 
       parent::__construct();
 
   }

 
  //After here my extended functions  

Reply




Theme © iAndrew 2016 - Forum software by © MyBB