I have these functions:
core / init.php:
...
spl_autoload_register(function($class) {
require_once ('libs/'.$class.'.php');
});
---
controllers / Images_Controller.php
require_once "core/init.php";
require_once "models/Image.php";
require_once "models/User.php";
class Images_Controller extends Controller {
...
}
As libs are some classes that I will need throughout the program, that is, I will need to request the libs without a doubt, but I will also need to request the models I need, this is a mvc model, the paths are relative to index.
My question is: how do I do within core/init.php
that the program does load ALSO of the models as I instantiate them?