There is a variable:
private $_classes = [ 'Component' => '/base/Component.php', 'Controller' => '/kernel/Controller.php', 'DataBase' => '/kernel/DataBase.php', ]; And there is a function that connects all these files and creates an object instance for each file:
public function autoload() { foreach ($this->_classes as $key => $value) { $path = base_url . $value; if (file_exists($path)) { require_once $path; return new $key; } } } However, for some reason, this code is executed only once and that's it. If you remove
return new $key That's all fine, all 3 classes are included.
Tell me which way to dig?