[eluser]xwero[/eluser]
you don't have to load the config file in the library. CI load the config file for you if it has the same name as the class you want to load. To get the values from the file you add a params parameter to the constuctor of the library and you use that parameter.
I would put the base_url in the smarty config file and instead of adding the CI instance to the assign_by_ref method i would put a framework setting in the config file and use that to call the framework instance.
Code:
Smarty_Container($params)
{
//...
parent::assign_by_ref('this', $this->{'instance-'.strtolower($params['framework'])}());
//...
}
function instance_ci()
{
$instance =& get_instance();
return $instance;
}
I would call it Smarty_container because that is the proper name IMO. If you use the third parameter of the load->library method you can attach the library as smarty if you want.
This makes the smarty container framework independent.