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

[eluser]Colin Williams[/eluser]
If I were you, I'd just do some logic in config/autoload.php. Parse the url, set libraries for the one condition and then set libraries for other conditions:

Code:
$autoload['libraries'] = array('all1', 'all2', 'notadmin');
if ($first_segment == 'admin')
{
   array_pop($autoload['libraries']);
}

No need to go crazy with multiple base controllers and whatnot.


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