Error loading custom subclass |
[eluser]ralf57[/eluser]
Hi all, i'm trying to add some functionality to the system "language" library. Following the user guide, i've created a new library (MY_Language.php) in /application/libraries Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); then if i try to load this extended libray in a controller Code: <?php i get an error Code: Fatal error: Cannot redeclare class CI_Language in /myhost/system/libraries/Language.php on line 27 the user guide seems quite clear about how to load the sub-class but i still get this error. Can you point me in the right direction? thanks in advance
[eluser]tonanbarbarian[/eluser]
I believe the Language class is automatically loaded and this is why you are getting the error. I would suggest putting a sample method into your extended language class and seeing it is working... it should.
[eluser]ralf57[/eluser]
[quote author="tonanbarbarian" date="1198259300"]I believe the Language class is automatically loaded and this is why you are getting the error.....[/quote] you're right, the language class is automatically loaded but there is no mention of this in the User Guide, at least here http://ellislab.com/codeigniter/user-gui...guage.html anyway,thanks for the trick |
Welcome Guest, Not a member yet? Register Sign In |