Welcome Guest, Not a member yet? Register   Sign In
Getting a loaded library instance: how?
#4

[eluser]Unknown[/eluser]
I also got this working, but will give the suggestions above a try since they seem a little cleaner.

Code:
$authclass = 'LDAPAuthenticator';
$this->load->library($authclass);
$authenticator = new $authclass();
$authenticator->foo();

dcunited08, the authentication interface is defined by 'Authenticator' and there are subclasses such as LDAPAuthenticator, MySQLAuthenticator, etc.

Thanks all!


Messages In This Thread
Getting a loaded library instance: how? - by El Forum - 11-06-2008, 10:46 AM
Getting a loaded library instance: how? - by El Forum - 11-06-2008, 11:42 AM
Getting a loaded library instance: how? - by El Forum - 11-06-2008, 11:45 AM
Getting a loaded library instance: how? - by El Forum - 11-06-2008, 12:54 PM
Getting a loaded library instance: how? - by El Forum - 11-06-2008, 01:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB