using spl_autoload_register to load classes that extends to another class
- by Fred Gustavo
Well, i got this oop:
abstract class TestSystemUtils {
abstract public function __run();
/* utils funcs */
}
class TestSystem extends TestSystemUtils {
protected $body;
protected $out;
function __construct() { }
public function __run() { }
}
I got a directory with many modules, each module is a class that extends TestSystem but i don't want to include all them modules then in method __run i make a dbconnection get these modules that will be used, but in this point idk the right way to 'include' these files i can use __autoload func but idk if i should call these classes inside the class TestSystem or not, all modules need to use these two variables 'body' and 'out' ... Well what's the right way to do it? someone could help me please.
Module classes look like:
class mod01 extends TestSystem { }
thanks.