I'm speaking mainly of simple classes that act as containers of data for the controllers and models. Say I have a basket model which takes care of adding fruit and vegetables for the controller. However, during the page load, i.e. between values are accessed from DB or session and are written back again, I am in need to create classes for storing data about fruit and vegetables. Each can contain its quantity or whatnot and perform the most basic of tasks (eventually it may expand but now its stuff like $fruits->add('apple',1)
).
Where should such classes ideally go in the hierarchy of the file system? They should be closely attached to the model, as they won't be needed for anything elsewhere.. Or should they be refractured into something else?