• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My_Model don't auto Load by Core/Loader

#4
File : application/core/MY_Model.php


Code:
class MY_Model extends CI_Model
{

  // creer ici une propriete avec le nom de la database
  private $commun;

  public function __construct()
  {
    parent::__construct();
    log_message('debug', __CLASS__ . " Class Initialized");
   $this->commun = $this->load->database('commun', TRUE, TRUE);

    // Pass reference of database to the CI-instance
    $CI = & get_instance();
    // Creation d'une propriété dans la controlleur qui permet d'y acceder rapidement n'importe ou
    // $CI->my_data_base = & $this->my_data_base;
    $CI->commun = & $this->commun;
  }
}


On CI V3.0.0 I have the message "MY_Model Class Initialized" in the log.txt
On CI V3.0.4 I haven't this message, but with my code in system/core/Loader.php that's fine !

??

Thanks !
Reply


Messages In This Thread
My_Model don't auto Load by Core/Loader - by Pad - 01-27-2016, 12:53 AM
RE: My_Model don't auto Load by Core/Loader - by Pad - 01-27-2016, 02:58 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.