CodeIgniter icon indicating copy to clipboard operation
CodeIgniter copied to clipboard

can't extend core classes

Open bitbucket-import opened this issue 15 years ago • 3 comments

There is ability in CI 2 to extend core controllers in folder 'application/core' - http://codeigniter.com/user_guide/general/core_classes.html But i've spent a lot of time extending core controller, then i decided to inspect Codeigniter.php in /sytem/core/ and discovered that name of extended class can only be MY_Controller.php (as example when default prefix is 'MY_'). {{{

!php

if (file_exists(APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller'.EXT)) { require APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller'.EXT; } }}} Fix it, Please.

bitbucket-import avatar Aug 20 '11 14:08 bitbucket-import

Exactly what is it you want to be fixed? Could you post an example code which reproduces the error?

DennisRas avatar Aug 20 '11 16:08 DennisRas

Just realized that these reports are imported without the user data of the original poster. I guess we'll never know what the author meant and this should probably get closed.

DennisRas avatar Aug 20 '11 16:08 DennisRas

Yeah there wasn't a way to migrate that information, so triage of these issues will be required. They are at least tagged as "Bitbucket New" and "Bitbucket Open" to indicate their source.

derekjones avatar Aug 20 '11 16:08 derekjones