[eluser]Unknown[/eluser]
I want to load a library specified in a config file as a string. Since the name of the class can change, I do to not want to hardcode it.
Code:
$authclass = $this->config->item('authenticator');
$this->load->library($authclass);
I could refer to this library statically:
Code:
$this->authenticator->foo();
But. how can I refer to this library dynamically? Something like:
Code:
$this->$authclass->foo();
Alternatively, is there a way so that:
Code:
$auth = $this->load->library($authclass);
then you'd think either this would work:
Code:
$this->$auth->foo();
or this
Thanks.