I’ve been trying to work around this, but can’t come up with anything clean… really, the init files need to go back in.
For the ADODB class, it has a function (ADONewConnection()) that parses the dsn, and generates the adodb object based on that .. eg, a dsn of “mysql://....” will load the class Adodb_mysql.
In CI, without calling that method, there is really no clean way to load the class. I was originally thinking that a class called Ado (so I can get $this->ado) could extend the main Adodb class, but since the class depends on the DSN, it’s not really possible.
I noticed a new _ci_varmap variable inside the Loader class (among some other cleanups, nice job Rick), so I was initially thinking that it would be good to add a method to allow the config files to call (though .. i’m iffy on config files calling functions..) that could add something to that varmap array, so classes could be created with a variable name of something else.. but really, it’s not as clean as the old init method.
I’m going to suggest that init go back in (though, with a slightly different implementation.. i will post a patch shortly) so that if there is an init file for a class, it gets called.. and otherwise, CI automatically generates as 1.5 does now.
init just made it really simple to integrate 3rd party libraries - in most cases, it was just a matter of creating an init file, and the library could be used. Now, it requires the library be coded in a certain way, and if it’s not, that it be extended and have a constructor to generate it properly - if that’s even possible (..it’s not for ADOdb).
