[eluser]wbremen[/eluser]
I extended the Core Class Lang (MY_lang) and would like to use CI Resources within it.
As the core classes and libraries are not automatically loaded in extended core classes, e.g. following method
does not work:
Code:
echo $this->config->item('base_url');
I am used to this behaviour in extended or self created libraries and tried the approach which is used in those cases.
Code:
class MY_Lang extends CI_Lang {
function __construct()
{
parent::__construct();
$CI =& get_instance();
}
.....
Code:
echo $CI->config->item('base_url');
But this
does not work either, somehow this brings the current controller to fail finding the CI_Controller class.
Does anyone know a workaround for this?