Hello,
I want to have a config linked with a particular library, so that when I load the library in my controller, the library class’s constructor pulls its parameters from the config file.
From the docs:
You can also pass parameters stored in a config file. Simply create a config file named identically to the class file name and store it in your application/config/ folder.
If my class is as follows:
class LDAP {
function LDAP($params)
{
// Do something with $params
print_r($params);
// Print the default user, for example
echo $params['default']['user'];
}
}
What should my config/LDAP.php look like? Is my constructor correct here?
