Welcome Guest, Not a member yet? Register   Sign In
Librairy vs model vs helper best place for authentification function ?
#5

[eluser]InsiteFX[/eluser]
You can load models in library, but for libraries you will need to the CI Super Object!
Code:
class library {

    private $CI;

    public function __construct()
    {
        $this->CI =& get_instance();

        $this->CI->load->model('model_name');
    }
}

// You will then have to use:
$this->CI  // to access models db etc!

InsiteFX


Messages In This Thread
Librairy vs model vs helper best place for authentification function ? - by El Forum - 04-26-2011, 09:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB