There appears to be a bug in the HMVC loader class when loading a library using an alias. I need two different instances of a library on the same page.
For instance,
$this->load->library(‘template’, NULL, ‘instance_1’);
$this->load->library(‘template’, NULL, ‘instance_2’);
But I always get back instance_1.
The problem appears to be in the MX/Loader method library(). Once the first load of the library class get cached, it always returns and doesn’t allow the alias logic for the second call to execute
public function library($library = ‘’, $params = NULL, $object_name = NULL) {
if (isset($this->_ci_classes[$class]) AND $_alias = $this->_ci_classes[$class])
return CI::$APP->$_alias;
}
Am I missing something?
thx