Welcome Guest, Not a member yet? Register   Sign In
core/Lang.php
#1
Exclamation 
(This post was last modified: 01-26-2015, 04:33 AM by stopz. Edit Reason: Added icon to my post. )

I'm trying to extend CI native Lang class to use MySQL Database. My problem is, i cant connect to DB or do $this->load->database or load anything.

I'v tried adding these classes manually like this:

Code:
# Extensions
require_once SYSDIR . '/core/Loader.php';
require_once SYSDIR . '/libraries/Session.php';

Still nothing. I also have Stackoverflows question running but it seems to have downgraded rating, like why? I'v been stuck on this for almost half a week and i cant figure it out.

Very short way to see my problem:

Code:
class JK_Lang extends CI_Lang {
       function __construct() {
        # Loading parent language class functions
        parent::__construct();
        
        # Loading database
        $this->load->database(); // Undefined property: JK_Lang::$load
        
        # Register as loaded
        log_message('debug', 'JK_Lang Class initialized');
    }
}

Fatal error: Call to a member function database() on a non-object in application/core/JK_Lang.php on line 31

PS: I'm very new to CI or any kind of MVC Framework.
Reply


Messages In This Thread
core/Lang.php - by stopz - 01-26-2015, 02:34 AM
RE: core/Lang.php - by Rufnex - 01-27-2015, 02:31 AM
RE: core/Lang.php - by Narf - 01-27-2015, 02:56 AM
RE: core/Lang.php - by d1a8lo24 - 01-27-2015, 04:12 AM
RE: core/Lang.php - by sv3tli0 - 01-27-2015, 05:16 AM
RE: core/Lang.php - by Narf - 01-27-2015, 08:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB