Welcome Guest, Not a member yet? Register   Sign In
Error loading custom subclass
#1

[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');
class MY_Language extends CI_Language {

    function __construct()
    {
        parent::CI_Language();
    }

    function getLanguage()
    {
        
    }


    function setLanguage()
    {
        
    }
    
}

?>

then if i try to load this extended libray in a controller
Code:
<?php

class Foo extends Controller {
    
    function __construct()
    {
        parent::Controller();
        $this->load->library('language');
    }

}

?>

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


Messages In This Thread
Error loading custom subclass - by El Forum - 12-21-2007, 03:53 AM
Error loading custom subclass - by El Forum - 12-21-2007, 05:48 AM
Error loading custom subclass - by El Forum - 12-21-2007, 07:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB