• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need for CI_ prefix when extending core libraries??

I seem to be running into a little issue when I try to extend a core class.

The user guide suggests the following prototype to extend a core class:

class MY_CoreClass extends CI_CoreClass {

    function My_CoreClass()

.. where CoreClass is obviously replaced with the class I am trying to extend.

However, CI chucks a fatal error "Fatal error: Class 'CI_CoreClass' not found ....".

I CAN, however, get my extensions to work if I drop the CI_ prefix:

class MY_CoreClass extends CoreClass {

    function My_CoreClass()

Is there something simple I'm doing wrong, or is there an error in the CI documentation?

Which core class are you trying to extend?

I believe Model and Controller are not prefixed with CI_

Aaah. That may be it.

I'm trying to extend Model.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.