Welcome Guest, Not a member yet? Register   Sign In
Pass current controller to Loader library.
#6

[eluser]wiredesignz[/eluser]
PHP5?, Yes, check out spl_autoload_register('autoload').
Code:
public function autoload($class)
{
    if (is_file($filename = APPPATH.'libraries/'.$class.EXT))
            
        include_once $filename;
}

Code:
class General extends Admin_controller /* Admin_controller class is loaded automatically */
{
    public function __construct()
    {
        parent::__construct();
    }
}


Messages In This Thread
Pass current controller to Loader library. - by El Forum - 07-30-2008, 04:35 PM
Pass current controller to Loader library. - by El Forum - 07-31-2008, 06:48 AM
Pass current controller to Loader library. - by El Forum - 07-31-2008, 07:58 AM
Pass current controller to Loader library. - by El Forum - 07-31-2008, 08:02 AM
Pass current controller to Loader library. - by El Forum - 07-31-2008, 08:10 AM
Pass current controller to Loader library. - by El Forum - 07-31-2008, 08:18 AM
Pass current controller to Loader library. - by El Forum - 07-31-2008, 08:42 AM
Pass current controller to Loader library. - by El Forum - 07-31-2008, 08:58 AM
Pass current controller to Loader library. - by El Forum - 07-31-2008, 09:26 AM
Pass current controller to Loader library. - by El Forum - 07-31-2008, 02:20 PM
Pass current controller to Loader library. - by El Forum - 07-31-2008, 03:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB