Extending Core Classes
Be sure to know what you are doing, extended core methods under the same name will be used by the core as well as by your application and this may result in unexpected behavior.
Extending but not replacing the core class
These are the easiest and will work like any other class you create; just make them extend the core class in the global namespace:
class MyConfig extends Config {}
Extending & replacing core classes
If you want your core extension to be used by the core as well as by your own application you need to extend it under the same name but take it from the "Fuel\Core" namespace. Below is an example for the Config class which you create in "fuel/app/classes/config.php":
class Config extends Fuel\Core\Config {}
But classes that have the same name as core classes are ignored by default. To make the Autoloader recognize your replacement you need to register it in the application bootstrap file. Search for the lines below:
Autoloader::add_classes(array(
// Add classes you want to override here
// Example: 'View' => APPPATH.'classes/view.php',
));
As is explained in the comments you need to add the new Config class as follows:
Autoloader::add_classes(array(
// Add classes you want to override here
// Example: 'View' => APPPATH.'classes/view.php',
'Config' => APPPATH.'classes/config.php',
));
After this the core class will have been replaced by your extension.
Note: the core class will still be available when used with full namespace prefixed. With the above example of
extending "Config" you can still use the original by calling "Fuel\Core\Config".