I was wondering if it is allowed to create an instance of a class inside another class.
Or, do I have to create it outside and then pass it in through the constructo
I'm just seeing this now and I wish to add my comment. It could be of benefit to anyone. Has anyone heard of php traits? Although traits does not import another class but only imports a trait into another class. So instead of trying to import several classes, you can have a main classe while the subclasses will act like traits making it possible for you to use them in main/parent classes