Im looking to build a very basic framework for my projects. Part of that is building an OO based system to assist in that. Currently, for all of the new classes (Sections) I make, im having to add all of the other classes I want to use in it manually. What im looking for, is a way, using classes and inheritance to create a central Class that the rest of my classes will extend. The central Class will have all of the other classes included so I make available, all of the other classes in the app. Example as follows: PrimaryClass has Database Class (Class has a function inside called doStuff) has General Class has Other Class TestClass extends PrimaryClass Should be able to do parent:atabaseClass::doStuff() Is this possible? Again, to reiterate, I want to make a primary class that uses __construct to include ALL other classes, then I would like to be able extend that class for all of my other Classes. Is this possible?
You could have your PrimaryClass use __autoload functions to automatically load the classes upon initialisation. Unfortunately, PHP does not support multiple inheritence.