Library Loading - Error |
[eluser]Shiju S S[/eluser]
I have extended CI_Loader: Code: class Loader extends CI_Loader Used it in another library file Site_Manager like this: Code: $this->load->library('loader'); I am getting an error Quote:A PHP Error was encountered My Module files are located in Quote:htdocs/backendpro/ Please help.
[eluser]PhilTem[/eluser]
1) You don't have to load the loader class, since it's automatically loaded when your CI::APP is initiated. Otherwise you won't even be able to load the loader class. See the recursion? ![]() 2) Did you read the user guide? If you want to extend a core library, you have to use your subclass_prefix which is defined in ./application/config/config.php. If you extended the CI_Loader class properly, it will automatically be loaded, too. 3) The loader class is assigned as Code: $this->load->some_method()
[eluser]Shiju S S[/eluser]
I changed code to Code: class Loader Same problem
[eluser]PhilTem[/eluser]
You still ought to actually change the name of your library to Code: class MY_Loader extends CI_Loader if you want to extend the CI_Loader and want the class to be autoloaded right when CI_Loader is loaded. |
Welcome Guest, Not a member yet? Register Sign In |