Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 2 can't extend CI_Model
#1

[eluser]Rui Lima[/eluser]
Hello,
I'm trying to extend CI_Model, but am unable to do it.

Code:
class MY_Model extends CI_Model{
        public function MY_Model(){
            $this->__construct();
        }    

        public function __construct(){
            parent::CI_Model();
        }

    }

then when it gives me error:
Quote:Fatal error: Class 'MY_Model' not found in

Code:
class User_Model extends MY_Model{ //<--- can't fund MY_Model
    public function User_Model(){
        $this->__construct();
    }    

    public function __construct(){
        parent::MY_Model();
        $em = $this->doctrine->em;
        
        $this->load->library('encrypt');
    }
}

Any ideas? (this is CodeIgniter 2.0, i was able to do this with 1.7)


Messages In This Thread
CodeIgniter 2 can't extend CI_Model - by El Forum - 08-07-2010, 11:14 AM
CodeIgniter 2 can't extend CI_Model - by El Forum - 08-07-2010, 11:28 AM
CodeIgniter 2 can't extend CI_Model - by El Forum - 08-07-2010, 11:38 AM
CodeIgniter 2 can't extend CI_Model - by El Forum - 08-07-2010, 01:58 PM
CodeIgniter 2 can't extend CI_Model - by El Forum - 08-07-2010, 06:29 PM
CodeIgniter 2 can't extend CI_Model - by El Forum - 01-31-2011, 04:51 PM
CodeIgniter 2 can't extend CI_Model - by El Forum - 08-25-2012, 08:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB