I'm trying to plan the php class structure for an order processing project. I've already used courses, but I'm not yet an expert in OOP. I have been searching for hours and can not seem to find the answer to this particular scenario, even if it is very common.
One of the main objects will be a
Order. As such, this class will have methods to manage getting and defining all the properties of the
Order example. (It will also have properties containing other objects such as tables of
Items ordered and
My question is: what happens when I need a filtered set of database orders? Make a method
Order it returns an array of .. himself? … is definitely not correct. Do one
Orders class that has methods to handle a single
Order as well as a range of
Order the objects the recommended way to handle this? Or is there another more suitable model?