The documentation for CodeIgniter says otherwise - one of first examples is:
If all you need to do is add some functionality to an existing library - perhaps add a function or two - then it's overkill to replace the entire library with your version. In this case it's better to simply extend the class. Extending a class is nearly identical to replacing a class with a couple exceptions:
The class declaration must extend the parent class.
Your new class name and filename must be prefixed with MY_
(this item is configurable. See below.).
class MY_Controller extends CI_Controller {
function __construct()
{
parent::__construct();
}
}
// Then you can use it like this:
class Welcome extends MY_Controller {
function __construct()
{
parent::__construct();
}
function index()
{
$this->load->view('welcome_message');
}
}