Welcome Guest, Not a member yet? Register   Sign In
CI in library object
#2

[eluser]wiredesignz[/eluser]
Don't make $CI a class variable. Use it discreetly in the functions that need it.

Code:
abstract class Superclass
{
    protected $data = array();
    
    function Superclass()
    {
        $CI = &get;_instance();
        $CI->load->database();
    }
}


Messages In This Thread
CI in library object - by El Forum - 02-06-2008, 04:10 AM
CI in library object - by El Forum - 02-06-2008, 05:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB