Hi, I have read from a few places that it is a best practice to keep each class in a separate file, e.g. class hotelRoom would be in hotelRoom.php or hotelRoom.class.php.
However when you start to read about design patterns and using polymorphism etc this gets a bit complicated. e.g.
[code=php]
abstract class hotelRoom{
private $cost;
}
class singleRoom extends hotelRoom{
}
class doubleRoom extends hotelRoom{
}
I do not really want to put all of these classes in their own separate file. Does anybody have an idea of the best practice for doing stuff like this?
I have been thinking of putting every class and interface etc that is related to the hotelRoom in a single php file, is this bad practice?
Thanks in advance