Welcome Guest, Not a member yet? Register   Sign In
How to Return an Instance of the Loaded Model Class Rather Than The Loader
#3
Thumbs Up 

Pertti, thank you so much.  I am deeply grateful to you.  I took into your correction, changed MY_Model class variables from 

private static $database_connection;
private static $table_name;


to non-static variables, modified the MY_Model constructor to 
function __construct($database_connection,$table_name){
   parent::__construct();
   
   $this->database_connection = $database_connection;
   $this->table_name = $table_name;
}


and then everything was perfectly ok. Right now, i dont need to reload an already loaded model class and can load a stack of unlimited model classes at a time without any single clash nor unwanted overrides.

Once again, Thank you Pertti[Image: thumbsup.gif][Image: thumbsup.gif][Image: thumbsup.gif]
Reply


Messages In This Thread
RE: How to Return an Instance of the Loaded Model Class Rather Than The Loader - by eminence - 06-29-2018, 05:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB