Allowing the same library class to be loaded again if an alias is used

#6 Declined
Repository
seandowney
Branch
default
Repository
wiredesignz
Branch
default
Author
  1. Sean Downey
Reviewers
Description

Allows the same library to be loaded more than once if an alias is used. eg $this->CI->load->library('session', $admin_session_config, 'admin_session');

Comments (1)

  1. darkless012 NA

    Hi, I'm not sure that your solution will work. (Try to load library with alias for the third time...)

    I resolved the same problem by switching order of the lines and adding extra "=". I'm still not sure what was ment by line 143. Generally the assignment in if is really stupid thing. It just lowers the readability.

    ($_alias = strtolower($object_name)) OR $_alias = strtolower($class);
    
    if (isset($this->_ci_classes[$_alias]) AND $_alias == $this->_ci_classes[$_alias])
        return CI::$APP->$_alias;