Replacing Core Classes |
[eluser]Unknown[/eluser]
---- DISREGARD ---- Found the bug report related to this topic. https://bitbucket.org/ellislab/codeignit...ses-in-200 --- END --- Hello Everyone! So I'm getting started with CI and noticed a few possible bugs with what the Documentation states and how CI operates. All information is relative to this documentation page. http://ellislab.com/codeigniter/user-gui...asses.html First it states that the Controller class can be overwritten while the code and my testing has proving otherwise. Line 226: system/core/CodeIngiter.php Code: // Load the base controller class The controller class is directly loaded from the system/core/Controller.php this makes it impossible to overwrite it in the application/core.php directory. I have seen some complaints that files in the application/core directory are not loaded, I also have ran into this problem and it seems that this is the culprit. As an example I created a application/core/URI.php to replace system/core/URI.php, giving the class the name CI_URI with a empty body. Code: class CI_URI {] The problem Line 128: system/core/Common.php Code: // Look for the class first in the native system/libraries folder As the comment states it will first load native classes. Replacing it with this Code: // Look for the class first in the native system/libraries folder It works as expected. As a note this for 2.0.2 |
Welcome Guest, Not a member yet? Register Sign In |