I’m looking for a method to create other core classes. There is no purpose of my code extending the current core and no use in creating it as a controller.
Is there somewhere that is specified what is to be auto-loaded?
I started with a very basic file
Application/core/world.php:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Class CI_Worlds{
function __construct(){
die('this is the end of the world');
}
}
?>
Trying to access it with $this->load->library('Worlds');
Have also tried other alternatives for the class name.
All auto loaded files are specified in
config/autoload.php. If you want to create a totally new class, place it inside the libraries directory.If you want to auto load it, open
config/autoload.phpand include the class name under $autoload[‘libraries’]: